Scalable Distributed Systems

To design a good distributed system, we must consider:

1. Data Centers

A large group of networked servers, built from commodity hardware. We scale out, not up. Software is designed for failure. They provide economies of scale.

They also allow elasticity: the ability to dynamically adjust resources based on demand.

2. Design Principles

A scalable system may be classified based on its response time:

Some design principles include:

  1. Stateless Services: data consistency is hard, so avoid this by making services stateless. For example, HTTP.
  2. Caching: allows reducing latency.
  3. Partition / Aggregation Pattern: allows dividing data into smaller chunks and processing them in parallel across multiple backends.
  4. Different Consistency Models: scalability is often lmited by the overhead in managing state consistency across backends. Do we always need strong consistency?
  5. Efficient Failure Recovery: full redundancy is too expensive, so we need to design efficiently for failure. You could replicate or even recompute.
Back to Home