What is the difference between vertical scaling and horizontal scaling, and when would you reach for each?
What they are really testing: They want to know if you understand that the cloud's superpower is adding more machines, not just bigger ones. The subtext is whether you think in single boxes or in fleets.
A real interview question
What is the difference between vertical scaling and horizontal scaling, and when would you reach for each?
What most people say
drag me
“Vertical is making the server bigger and horizontal is adding more servers, and horizontal is always better.”
It parrots the definition but treats horizontal as a blanket win. A senior knows stateful systems and databases often scale up first, and that there are real trade-offs.
The follow-ups they ask next
Why does horizontal scaling need the workload to be stateless?
Explain that if a user's session lives on one instance, a different instance cannot serve their next request. Mention pushing state to a shared store like a cache or database.
How does the system decide when to add or remove instances?
Describe autoscaling driven by a metric like CPU or request count, with thresholds and a cooldown so it does not flap.
What the interviewer is listening for
- name the ceiling on vertical scaling
- connect horizontal scaling to statelessness
- admit databases often scale up first
- mention load balancers and autoscaling
What sinks the answer
- call horizontal scaling always better
- ignore state entirely
- think you can resize a live machine for free
- confuse the two terms
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“Vertical scaling means [making one machine bigger], and horizontal scaling means [adding more machines behind a load balancer]. I lean horizontal for [stateless web tiers] because [I can add and remove instances on demand], but I scale up for [things that cannot be split easily, like a single database].”
Keep going with reliability
Foundation
What is a Region versus an Availability Zone, and why does the difference matter?
Foundation
What does "highly available" actually mean, and how do you achieve it?
Foundation
Why are stateless services easier to scale and make reliable than stateful ones?
Junior
How should a service retry a failed call to a dependency, and what is a retry storm?
Junior
What is idempotency, and why does it matter for reliable distributed systems?
Junior
What is graceful degradation, and when would you fail open versus fail closed?
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free