DEV Community

Cover image for Horizontal vs vertical scaling for system design interviews, explained
Gowtham Potureddi
Gowtham Potureddi

Posted on

Horizontal vs vertical scaling for system design interviews, explained

Horizontal vs vertical scaling for system design interviews, explained

Every design eventually hits the wall where one server cannot keep up, and there are only two ways over it: make the machine bigger, or add more machines. That is vertical vs horizontal scaling — scale up by giving one node more CPU, memory and disk, or scale out by distributing the load across many nodes. The distinction is easy to recite, which is exactly why interviewers use it: the real question is not what they are, but why you pick one, and — the part that separates a recited answer from an understood one — what horizontal scaling actually requires before you can do it. It is one of the most common system design interview concepts because "we'll just scale it" is the easy sentence, and the tradeoffs and prerequisites are where the follow-ups land.

The reason it comes up is that scaling is the whole point of a high-level design, and the two directions have opposite properties. Scaling up is simple — no code changes, no distributed-systems complexity — but it hits a hard ceiling, gets expensive fast, and leaves you with a single point of failure. Scaling out has no real ceiling and survives a machine dying, but it only works if your system is built to spread across nodes: stateless servers, a load balancer, and a data layer that can itself scale. This guide walks what a strong candidate names out loud: what each scaling direction is, the tradeoffs that decide between them, what horizontal scaling requires, and when to pick which.

Title card for a system design interview explainer on horizontal versus vertical scaling, showing vertical scaling as one server growing larger with more CPU and memory, and horizontal scaling as a load balancer distributing requests across many identical servers, on a dark citrus-and-lavender background.

Why horizontal vs vertical scaling comes up in system design interviews

Scaling rarely gets its own prompt; it is the pressure the whole design is under. The moment you estimate the load and it exceeds one server, the interviewer asks how you scale — and if you say "add more servers," the follow-up is the real test: adding servers only helps if a request can go to any of them, so what did you have to design to make that true? Horizontal vs vertical is a favourite probe because "scale it out" is the easy half, and statelessness, the load balancer, and the database being the real bottleneck are where understanding of actual scaling shows.

The interviewer rarely lets "we'll add more servers to handle the load" stand on its own. "You add a second app server behind a load balancer, but users keep getting logged out at random. Why — and what do you have to change so that any server can handle any request?" That question — the statelessness horizontal scaling silently requires — is the one a memorised "horizontal means more machines" answer can never survive.

The rounds on Zynter are modelled on how the loop runs, not scraped from any candidate's recall. What matters for prep is the shape: you say "scale out," and the next sentence attacks the session that lives on one server, the database that did not scale with the app tier, or the ceiling you just hit.

What the interviewer is really testing

A scaling answer is read on the same four dimensions as any design decision. Problem solving — did you scale the right tier the right way, or just say "more servers"? Communication — can you say in one sentence why vertical scaling has a ceiling and a single point of failure? Technical execution — do you know horizontal scaling needs statelessness, a load balancer, and a scalable data layer? Time management — did you spend your words on the prerequisites and the database bottleneck, not on CPU specs? Reading this guide teaches the concept; it does not teach you to defend a stateless design while someone's session disappears.

What vertical and horizontal scaling are

Start with the two directions, each with its plain definition:

  • Vertical scaling (scaling up) — make a single machine more powerful: add CPU cores, more RAM, faster or bigger disk. The system stays one node; you just give it more resources. A database that outgrows its box moves to a bigger box. Nothing about the application architecture changes — it is the same system on stronger hardware.
  • Horizontal scaling (scaling out) — add more machines and spread the work across them. Instead of one powerful server you run many commodity servers behind a load balancer that distributes requests. The application must be designed so the work can be split across nodes.

The key mental distinction: vertical scaling grows one node, horizontal scaling grows the number of nodes. Vertical keeps the system simple because there is still only one of everything and no coordination; horizontal changes the architecture because now many nodes must cooperate, which is both its power (no ceiling, fault tolerance) and its cost (distributed-systems complexity). The sentence that scores: vertical scaling is a bigger machine — simple, but one node with a ceiling; horizontal scaling is more machines behind a load balancer — unlimited and fault-tolerant, but only if the system is built to spread across them.

A diagram contrasting vertical and horizontal scaling, showing vertical scaling as a single server growing from small to large with more CPU, RAM and disk while staying one node, and horizontal scaling as a load balancer in front of several identical commodity servers that share the load, with a note that vertical grows one node and horizontal grows the number of nodes.

The tradeoffs that decide it

The choice is a set of opposing tradeoffs, and naming them is what turns a definition into an answer. Lay them side by side:

  • Ceiling. Vertical scaling has a hard limit — there is a biggest machine you can buy, and you eventually hit it. Horizontal scaling has no practical ceiling — you keep adding nodes.
  • Single point of failure. A vertically-scaled system is one machine, so its failure is an outage. A horizontally-scaled system survives a node dying because others keep serving — it is inherently fault-tolerant.
  • Cost. Vertical scaling gets expensive fast — top-end hardware costs disproportionately more, and you often pay for a whole bigger box to get a little more headroom. Horizontal scaling uses commodity hardware and scales cost more linearly, which is why hyperscale is horizontal.
  • Complexity. Vertical is simple — no code changes, no distributed-systems problems. Horizontal adds complexity — load balancing, data consistency across nodes, coordination, network latency — the cost you pay for the ceiling-free scale.
  • Downtime. Scaling up often needs a restart or migration to the bigger machine (downtime), while scaling out can add nodes live with no interruption.

The sentence that scores: vertical scaling is simple but capped, pricey at the top, and a single point of failure; horizontal scaling is unlimited, fault-tolerant and cheaper at scale, but it costs you distributed-systems complexity and only works if the system is stateless and the data layer scales too. So I scale up for simplicity until the ceiling or the availability need forces me out. Naming the complexity and the single-point-of-failure point is what reads as judgment.

A comparison diagram of the tradeoffs between vertical and horizontal scaling across five dimensions — ceiling, single point of failure, cost, complexity and downtime — showing vertical scaling as simple and with no code changes but capped, a single point of failure, expensive at the top end and needing downtime to upgrade, and horizontal scaling as unlimited, fault-tolerant, cost-effective at scale and able to add nodes live but requiring distributed-systems complexity.

System Design
HLD · Core concept
Weigh the scaling tradeoffs out loud

Practise on Zynter →

What horizontal scaling actually requires

This is the section the interview is really built on, because "add more servers" only works if the system was designed for it — and most follow-ups probe exactly these prerequisites:

  • Statelessness. Each server must not hold request state locally — no session stored in process memory — so that any server can handle any request. If a user's session lives on server A and the load balancer sends their next request to server B, they get logged out. You fix it by keeping app servers stateless and pushing state to a shared store (a session store, a cache, the database), which is the single most important requirement.
  • A load balancer. Something must distribute requests across the fleet (round-robin, least-connections) and route around dead nodes with health checks. Without it, more servers do nothing.
  • Session handling. Sessions go into a shared external store (like Redis) or you use stateless tokens (a signed JWT the client carries), rather than in-process sessions. Sticky sessions (pinning a user to one server) are a crutch that limits balance and breaks on that server's failure.
  • A data layer that also scales. Adding app servers does nothing if they all hammer one database — the database becomes the bottleneck. So horizontal scaling of the stateless tier must be paired with scaling the data layer: read replicas for read load and sharding for write load. Scaling the web tier is easy; scaling the database is the hard part, and naming that is the senior move.

The point to state plainly: horizontal scaling is not "more boxes," it is statelessness + a load balancer + a data layer that scales — and the stateless web tier is the easy part while the database is the real constraint. Naming statelessness unprompted is the single biggest tell.

A diagram of what horizontal scaling requires, showing a load balancer distributing requests across several stateless application servers none of which hold session state locally, a shared external session or cache store (and stateless tokens) that any server can read so any server can handle any request, and a data layer that also scales with read replicas for read load and sharding for write load, with a note that the stateless web tier is easy to scale out while the database is the real bottleneck.

System Design
HLD · Core concept
Name what horizontal scaling requires out loud

Practise on Zynter →

When to pick which: scale up first, then out

"Scale it" is not a single move, and a strong answer sequences the two directions:

  • Scale up first — for a young system or a moderate load, vertical scaling is the right first move because it is simple: no architecture change, no distributed-systems problems, and a bigger machine buys real headroom immediately. Do not add distributed complexity before you need it.
  • Scale out when you hit the vertical ceiling (the biggest machine is not enough), when you need fault tolerance (one machine's failure cannot be an outage), or when you want elasticity (add and remove nodes with demand, which only horizontal scaling allows). At real scale, horizontal is the only option.
  • Scale the tiers differently. The stateless web/app tier scales out easily — just add servers behind the load balancer and auto-scale with load. The database is where scaling out is hard, so it is often scaled up longer and then scaled out carefully with replication and sharding. A good answer scales each tier the way that tier allows.

The useful line: scale up first because it is simple, and scale out when you hit the ceiling, need fault tolerance, or want elasticity — and recognise the stateless tier scales out trivially while the database is the real work. Saying "I'd scale vertically first and avoid distributed complexity until I need it" is a maturity signal, not a weakness.

How to talk about scaling in an interview

The probes from every section rhyme. Master these five and you can defend a scaling decision in any design, not just this checklist.

  • "Vertical or horizontal here?" → Vertical (a bigger machine) for simplicity early on; horizontal (more machines behind a load balancer) once you hit the ceiling, need fault tolerance, or want elasticity. (problem solving)
  • "Why not just keep scaling up?" → It has a hard ceiling, gets expensive at the top, needs downtime to upgrade, and leaves a single point of failure; horizontal removes all four at the cost of complexity. (communication)
  • "You added a server and users get logged out — why?" → The servers aren't stateless: a session lived on one server and the load balancer sent the next request elsewhere; fix it by externalising sessions to a shared store or using stateless tokens. (technical execution)
  • "What does horizontal scaling actually require?" → Statelessness so any server handles any request, a load balancer to distribute traffic, shared session handling, and a data layer that also scales with replicas and sharding. (technical execution)
  • "You scaled the app tier but it's still slow — why?" → The database is the bottleneck: adding stateless servers doesn't help if they all hit one database, so you must scale the data layer too. (problem solving)

Each maps to a debrief dimension. Reading them teaches the answers; it does not teach you to deliver them while someone's session disappears — that only comes from saying them out loud.

How to prepare: a short plan

You do not need a new topic for every design. You need the scaling vocabulary automatic, so when a design hits its load limit you reach for the right direction and its prerequisites.

  • Day 1: Learn the two directions and their tradeoffs (ceiling, single point of failure, cost, complexity, downtime), until you can state why you pick each in one sentence.
  • Day 2: Drill what horizontal scaling requires — statelessness, a load balancer, shared sessions, and scaling the data layer — and why the database is the hard part. These are where the follow-ups live.
  • Day 3: Place scaling inside a real design: scale the stateless web tier out behind a load balancer, externalise sessions, and scale the database with replicas and sharding. Then do it out loud, timed, with someone pointing out a session that lives on one server.

This explainer feeds the broader Top 25 system design interview questions — scaling is the pressure behind every high-level design, so getting it automatic pays off across the whole list.

Frequently asked questions

What is the difference between horizontal and vertical scaling?

Vertical scaling, or scaling up, means making a single machine more powerful by adding CPU, memory or disk — the system stays one node and runs the same architecture on stronger hardware. Horizontal scaling, or scaling out, means adding more machines and distributing the work across them, typically many commodity servers behind a load balancer. The core distinction is that vertical grows one node while horizontal grows the number of nodes. Vertical is simpler because there is still only one of everything and no coordination, but it hits a hard ceiling, gets expensive, and is a single point of failure. Horizontal has no practical ceiling and survives node failures, but it only works if the system is designed to spread across nodes — stateless servers, a load balancer, and a data layer that can scale too.

What are the tradeoffs between scaling up and scaling out?

They are opposite on five axes. Ceiling: vertical has a hard limit (the biggest machine you can buy), horizontal has none. Availability: vertical is a single point of failure, horizontal is fault-tolerant because other nodes keep serving when one dies. Cost: vertical gets disproportionately expensive at the top end, horizontal uses cheaper commodity hardware and scales cost more linearly. Complexity: vertical is simple with no code changes, horizontal adds distributed-systems complexity like load balancing, data consistency and coordination. Downtime: scaling up usually needs a restart or migration, while scaling out can add nodes live. The practical conclusion is to scale up first for simplicity and scale out when the ceiling, the availability need, or elasticity forces you to.

What does horizontal scaling require?

It requires that the system be built to spread across nodes, which comes down to four things. First and most important, statelessness: application servers must not hold request state locally, so that any server can handle any request — otherwise a user whose session lives on one server gets logged out when the load balancer routes them elsewhere. Second, a load balancer to distribute requests across the fleet and route around dead nodes. Third, session handling via a shared external store (like Redis) or stateless tokens such as a signed JWT, rather than in-process sessions. Fourth, a data layer that also scales — adding stateless app servers does nothing if they all hit a single database, so you pair horizontal scaling of the web tier with read replicas and sharding for the database, which is the genuinely hard part.

Should you scale up or scale out first?

Scale up first, then out. For a young system or a moderate load, vertical scaling is the right first move because it is simple — no architecture change, no distributed-systems complexity — and a bigger machine buys immediate headroom, so you avoid adding distributed complexity before you need it. You scale out when you hit the vertical ceiling (the biggest machine is no longer enough), when you need fault tolerance (a single machine's failure cannot be allowed to be an outage), or when you want elasticity (adding and removing capacity with demand, which only horizontal scaling allows). It also helps to scale tiers differently: the stateless web tier scales out trivially by adding servers behind the load balancer, while the database is harder and is often scaled up longer before being scaled out carefully with replication and sharding.

How do I practise a system design interview out loud?

Reading about scaling is not the same as defending a stateless design while an interviewer points out a session that lives on one server. On Zynter, the HLD track runs live voice rounds modelled on how real system design loops run — you talk through a design on a shared canvas, and a voice interviewer follows up one question at a time ("vertical or horizontal?", "you added a server and users get logged out — why?", "the app tier scaled but it's still slow — why?"), then gives you a debrief on problem solving, communication, technical execution and time management. The score is a practice signal, not a hiring decision.

Practise it on Zynter

You can say "scale horizontally." The round is won on statelessness and the database bottleneck.

Pick an HLD system design round, scale your design under load on the canvas, and defend it out loud to a voice interviewer that keeps asking "why not just scale up?" and "you added a server and users get logged out — what did you miss?" — then read the debrief. Zynter.ai is on-demand mock interviews modelled on real company loops, with 150+ rounds across 20 companies including the HLD system design track (Sep 2026).

Practise an HLD system design round →
Browse all interview tracks

Top comments (0)