Skip to content

Instantly share code, notes, and snippets.

@MithunArunan
Last active June 22, 2018 09:13
Show Gist options
  • Save MithunArunan/af7c13bfaf2dedc684cf3888ccce8b13 to your computer and use it in GitHub Desktop.
Save MithunArunan/af7c13bfaf2dedc684cf3888ccce8b13 to your computer and use it in GitHub Desktop.

Distributed Systems

Single node patterns

Sidecar pattern

Extends or augments the application container used as,

Proxy

Configuration manager

Modularity

Ambassdors

Alters the way application container communicates to the outside world

Sharded

Service Brokering

Request Splitting or Experimentation

Adapters

Modifies the interface of the application container to conform with the expected interface

Monitoring with Prometheus

Logging with FluentD

Health Checks

Multi node or Serving patterns

Microservices

Replicated Load-Balanced services

Stateless services

Session tracked services

Application layer replicated services - Varnish Cache

Sharded services

Replicated sharded caching with Memcache

Either use ambassador pattern or sharded service

Sharding functions to route traffic to the correct shard.
  • Determinism (Output must be same for the same input)

  • Uniformity (All the shards are equally load balanced)

Selecting a good key for sharding

(req.path | req.path + req.country)

Hot Sharding systems

Scatter/Gather

Presto DB - Co-ordinator node distributes work among the Worker nodes.

Functions and Event driven Processing

FaaS, Event driven and Serverless

Decorator Pattern

  • Request defaulting before request processing
  • 2 FA

Ownership election

Batch computational patterns

Work Queues

Event-Driven Batch processing

Coordinated Batch processing

Kubernetes

Redis ElasticSearch

RabbitMQ Kafka

MySQL Presto Hadoop Mongo

Locust

Reference

O'Reilly Designing Distributed systems - Patterns and Paradigms for scalable, reliable services - Brendan Burns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment