Knowledgebase

Designing Systems That Scale Print

  • softwareengineering, software, caching, database, guide, howto, solution, zillionkinghost
  • 0

Handling growth.

WHAT VERTICAL SCALING IS

A bigger machine.

What it provides: simplicity, and no change to the application.

What it costs: a limit, and a single point of failure.

WHAT HORIZONTAL SCALING IS

More machines.

What it provides: scale beyond one machine, and redundancy.

What it costs: the application must support it, and complexity increases.

WHAT MAKES HORIZONTAL SCALING POSSIBLE

Statelessness: any request handled by any instance.

WHAT TO DO ABOUT STATE

Keep it in shared storage, not in the instance.

WHAT A LOAD BALANCER DOES

Distributes requests across instances, and stops sending to unhealthy ones.

WHAT CACHING ACHIEVES

Avoiding repeated work, which is frequently the largest available improvement.

WHAT TO SCALE FIRST

Whatever is actually the constraint, measured.

WHAT IT USUALLY IS

The database.

WHAT TO DO ABOUT THAT

Indexes, query improvement, read replicas, caching — in that order, usually.

WHAT TO AVOID

Scaling before measuring Designing for scale you do not have

WHY

Most systems never reach the scale their designs anticipate.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot