Scalability, Load Balancing and Stateless Services
A service that works for 100 users often breaks at 100,000. Scaling means handling more load by adding machines; the load balancer (a program or device that spreads incoming requests over many servers) makes many servers look like one. Interviewers ask how you would grow a service, why servers should be stateless (keep no user data in their own memory), and how requests are spread.
After this section you can tell latency from throughput, choose between a bigger machine and more machines, compare ways of spreading requests, explain why hash(key) mod N breaks, and size a service with spare capacity.
Topics in this section
- Scalability, performance, latency and throughput
- Vertical and horizontal scaling, and stateless servers
- How requests are spread
- Health checks, lame duck and subsets
- Why hash(key) mod N breaks
- Capacity planning with headroom