Please enable JavaScript.
Coggle requires JavaScript to display documents.
Designing Distributed Systems (Serving Patterns (Sharded Services …
Designing Distributed
Systems
Single Node
Patterns
Side Car
One container augments a pre-existing
container to add functionality
Adding HTTPs to Legacy Service
Dynamic Configuration with Sidecars
Modular Application Containers
implement an HTTP /topz interface that provides a readout of resource usage
Building a Simple Paas with Sidecars
Adapters
container brokers interactions between the application
container and the rest of the world
Monitoring
a single solution that can automatically discover and monitor any application that is deployed into your environment. eg. Using Prometheus for Monitoring
Logging
Different application containers can log information in different formats, but the adapter container can transform that data into a single structured representation that can be consumed by your log aggregator. eg. fluentd
Adding a Health Monitor
eg: Adding a monitor to a database container
Ambassador
container is used to modify the interface of the application container so that it conforms to some predefined interface that is expected of all applications
Using an Ambassador to Shard a Service
Using an Ambassador for Service Brokering
Using an Ambassador to Do Experimentation or Request
Splitting
Serving Patterns
Replicated Load-Balanced Services
Provides redundancy and scale
Readiness probe is equally important
Stateless Services
Ones that don’t require saved state to operate correctly
Session Tracked Services
Application-Layer
Replicated Services
Caching - web cache
ex: HTTP reverse proxy - Varnish
Rate Limiting
SSL Termination
Sharded Services
Sharding Function
Determinism
Uniformity
Choosing a sharding key
request path
country(request.ip)
...
Sharding strategy
Simple sharded service
Replicated sharded service
Consistent Hashing
Resharding
hash(key)%10 to
hash(key)%11 ?
Hot Sharding
Scatter/Gather
Increased parallelism doesn’t always speed things up because of overhead on each node.
Increased parallelism doesn’t always speed things up because of the straggler problem.
Scaling Scatter/Gather for Reliability & Scale
Functions & Event Driven Processing
The Decorator Pattern : Request or Response Transformation
Handling Events
Event-Based Pipelines
Ownership Election
Locking
Ownership
Handling concurrent data
Manipulation
Batch Computational
Patterns
Work Queue Systems
With Kubernetes