Scalability: Vertical vs Horizontal Scaling
Scalability is the foundation every other system design topic builds on. Understanding the trade-off between scaling up and scaling out is where most answers should start.
Vertical Scaling (Scaling Up)
Adding more CPU, RAM, or disk to a single machine. It's simple — no distributed systems complexity — but it has a hard ceiling, and a single point of failure. Good for early-stage systems or components that are genuinely hard to distribute, like a primary relational database.
Horizontal Scaling (Scaling Out)
Adding more machines and distributing load across them. This is how large-scale systems handle growth beyond what one machine can offer, and it also improves fault tolerance — one machine failing doesn't take the whole system down. The trade-off is added complexity: you now need load balancing, data partitioning, and coordination between nodes.
What to Say in an Interview
Don't just say "we'll scale horizontally" — name what becomes hard as a result (state management, data consistency, request routing) and how you'll address it. That's the signal interviewers are listening for.
Stateless vs Stateful Services
Horizontal scaling is far easier when your services are stateless — any server can handle any request because no server holds session-specific data in memory. If state is unavoidable, push it out to a shared store (a database or cache) rather than keeping it on the instance itself.
A common example that trips candidates up: storing a user's session or shopping cart in server memory works fine on one machine, but breaks the moment a load balancer routes their next request to a different instance. Moving that state to Redis or a database, keyed by session ID, is the standard fix — and naming it proactively is a good signal.
A Realistic Scaling Path
Most real systems don't start horizontally scaled — they start on a single beefy machine, hit a ceiling, and then scale out one bottleneck at a time (first the web tier, then the database). Describing this evolution, rather than jumping straight to a fully distributed design, often reads as more experienced.
Diminishing Returns and Cost
Vertical scaling has a cost curve, not just a ceiling — the largest available machines are disproportionately expensive per unit of capacity compared to mid-tier ones. It's worth mentioning this trade-off explicitly: scaling up is often the pragmatic first move, but it's rarely the final answer for a system expected to keep growing.
Ready to put this into practice?
Upload your resume and get matched with a verified referrer today.
Get Started