Scalability Fundamentals
Vertical vs. horizontal scaling, and load balancing — the baseline vocabulary every other system-design topic builds on.
Vertical vs. horizontal scaling
Vertical scaling means a bigger machine (more CPU/RAM) — simple, but has a hard ceiling and a single point of failure. Horizontal scaling means more machines sharing the load — no hard ceiling, and failure of one machine doesn't take down the whole system, but it requires the application to be designed for distributed state (or to be stateless).
Load balancing
A load balancer distributes incoming requests across multiple servers, commonly via round-robin (rotate through servers evenly), least-connections (send to the server with fewest active requests), or consistent hashing (route the same client/key to the same server, useful for cache locality).
Stateless vs. stateful services
A stateless service keeps no per-client data between requests (session data lives in a shared store like Redis instead) — this is what makes horizontal scaling straightforward, since any server can handle any request. A stateful service ties a client to a specific server, complicating both load balancing and failover.
Why it's the root of system design
Caching, database scaling, and async messaging are all specific techniques for handling more load — this topic is the vocabulary (horizontal vs. vertical, stateless design) they're all expressed in.
