The Key Trade-offs
System design has almost no free wins. Here are the recurring either/or decisions and how to reason about each.
The key trade-offs in 30 seconds
- There are no free wins — every choice buys one property by spending another. Your job is to spend wisely for this system.
- Vertical vs horizontal: bigger box (simple, has a ceiling) vs more boxes (scales, adds complexity).
- Strong vs eventual consistency: always-correct-but-slower vs fast-and-available-but-briefly-stale.
- Sync vs async: immediate answer vs decoupled, resilient, but eventually-done.
- Stateful vs stateless: remembers context (harder to scale) vs forgets (easy to scale, state goes elsewhere).
- Latency vs throughput: fast per-request vs high total volume — batching trades one for the other.
- The senior move: name what you optimized for and what you gave up, out loud.
There's no such thing as a free lunch
Walk into any shop and you'll never find a coat that's the cheapest, warmest, lightest, and most stylish all at once — if it existed, it'd be the only coat anyone sold. Every real coat is a trade: cheap but bulky, light but cold, warm but pricey. You don't look for the perfect coat; you decide which qualities matter for your winter and spend accordingly. System design is exactly this. There is almost never an option that wins on every axis — so the skill isn't finding the best choice, it's choosing what to give up on purpose.
This page is the catalog of the trades you'll make again and again. For each one, the move is the same: understand both sides, then pick deliberately for the system in front of you — and say out loud what you gave up.
The one idea behind all of them
If you remember nothing else: system design is the art of choosing what to give up. There's rarely a choice that's better on every axis — faster usually costs more, simpler usually scales less, stronger guarantees usually cost availability or speed. Junior answers pick an option. Senior answers pick an option and say what they traded away and why it's acceptable here. This page is the catalog of those recurring trades.
Why 'it depends' is the honest answer
Beginners hate hearing 'it depends', but it's the literal truth, and understanding why is the whole point of this page. A trade-off only resolves once you know what the system values — and different systems value opposite things. A bank ledger would rather be briefly unavailable than ever show a wrong balance. A social feed would rather show a slightly stale like-count than ever go down. Same two options (correctness vs availability), opposite correct answers, because the requirements differ.
So the useful question is never 'which is better?' but 'better for what?'. That reframing is what turns 'it depends' from a dodge into the start of real reasoning — you follow it with 'it depends on X, and since this system needs X, I'd choose Y.'
Scaling: vertical vs horizontal
When load grows, you can give your system a bigger machine (vertical / scale up) or more machines (horizontal / scale out). Up is the easy button — no code changes — but every machine has a ceiling and it's still one box to lose. Out is nearly limitless and adds redundancy, but it forces real work: your services have to become stateless, you need a load balancer in front, and your data has to be partitioned.
- Vertical (bigger box): dead simple, no code changes — but there's a hard ceiling and it's still one machine to lose.
- Horizontal (more boxes): scales almost without limit and adds redundancy — but needs stateless services, load balancing, and data partitioning.
- Lean: vertical while it's cheap and easy; horizontal when growth or availability truly demands it. (More in Scalability.)
Consistency: strong vs eventual
When data lives on more than one machine, you choose how fresh a read must be. Strong consistency means every read sees the latest write — simplest to reason about, but it costs latency and availability (during a network partition, some reads must block or fail). Eventual consistency means replicas catch up shortly after a write — fast and always available, but a read can briefly return a stale value, and you must handle conflicts.
- Strong: every read sees the latest write; simplest to reason about — but slower and less available during partitions.
- Eventual: fast and always-available — but reads can be briefly stale and you must handle conflicts.
- Lean: strong for money, inventory, bookings; eventual for feeds, counts, likes. Decide per piece of data, not system-wide. (See Consistency models and CAP & PACELC.)
Communication: synchronous vs asynchronous
When one part of your system needs another to do something, it can wait for the answer (synchronous) or hand off the work and move on (asynchronous). Sync is simple and immediate — but the caller's fate is now tied to the callee being up and fast. Async decouples them through a queue: the caller isn't blocked, spikes get absorbed, and a downstream outage doesn't cascade — at the cost of the result being eventual and the flow harder to trace.
- Synchronous: the caller waits for an answer — simple and immediate, but the caller's fate is tied to the callee being up and fast.
- Asynchronous: hand off via a queue and move on — resilient to spikes and downstream outages, but the result is eventual and harder to trace.
- Lean: sync when the user needs the answer now; async for slow work, spiky load, or fan-out to many systems. (See Message queues.)
# Synchronous: the user's request waits for the slow work to finish
def upload(photo):
save(photo)
generate_thumbnails(photo) # ~3s — the user stares at a spinner
return "done" # ...and if this step is down, upload fails
# Asynchronous: accept fast, do the slow work off the request
def upload(photo):
save(photo)
queue.publish("make-thumbnails", photo.id) # hand off, don't wait
return "uploaded" # instant response; thumbnails appear shortly afterState: stateful vs stateless
Does a server remember anything about a client between requests? A stateful server keeps context in its own memory — convenient, but it pins that client to that one machine, which fights horizontal scaling and failover (lose the box, lose the state). A stateless server keeps nothing locally; any request can go to any server because the shared truth lives in a cache or database. That's why statelessness is the quiet enabler of almost all horizontal scaling.
- Stateful: the server remembers context between requests — convenient, but it pins a user to one machine and fights horizontal scaling and failover.
- Stateless: each request is self-contained; state lives in a shared store — any server handles any request, so scaling and failover are easy.
- Lean: keep services stateless and push state to a cache or database. It's the quiet enabler of almost all horizontal scaling.
// STATEFUL: session stored in this server's memory
const sessions = {}; // lives on THIS box only
app.post("/login", (req, res) => { sessions[req.id] = user; });
// -> the load balancer MUST send this user back to this exact server,
// and if the box dies, the user is logged out. Scaling is painful.
// STATELESS: state lives in a shared store, servers hold nothing
app.post("/login", (req, res) => {
redis.set(req.id, user); // shared — any server can read it
});
// -> any server can handle any request; add/remove boxes freely.Processing: batch vs stream
- Batch: process big chunks on a schedule — efficient and simple, but results lag (minutes to hours old).
- Stream: process events as they arrive — near real-time, but more complex and harder to get exactly-once right.
- Lean: batch for reports and heavy aggregations where freshness doesn't matter; stream for dashboards, alerts, and anything users watch live.
Reads: push vs pull
- Pull: the client asks when it wants data — simple, but either laggy or wasteful if it polls often.
- Push: the server sends updates as they happen — timely and efficient at steady state, but needs persistent connections and more server bookkeeping.
- Lean: pull for occasional, on-demand data; push (WebSockets/SSE) for live, high-frequency updates. (See Communication protocols.)
Latency vs throughput
A reminder that these two pull against each other: batching raises throughput (more work per round trip) but adds latency (each item waits for the batch). Pick based on whether users feel per-request delay or whether raw volume is the real constraint. (Full detail in Latency & throughput.)
function get_price(id):
cached = cache.get(id)
if cached is not null:
return cached # fast (~1ms) but may be a few seconds stale
price = db.read(id) # slow (~50ms) but always the latest write
cache.set(id, price, ttl = 30s) # shorter TTL = fresher but slower/costlier
return price
# Tune the TTL to the data: seconds for a feed, zero (skip cache) for money.How these trades connect
These aren't independent dials — pick one and others tend to follow. Choosing horizontal scaling almost forces you stateless (so any box can serve any request); going stateless pushes your state into a shared store, which raises a consistency question; choosing async for resilience buys you eventual results, which is itself a consistency choice. Seeing the chain is what lets you reason about a whole design instead of one knob at a time.
| If you choose... | It tends to pull you toward... | Because |
|---|---|---|
| Horizontal scaling | Stateless services | Any server must be able to serve any request |
| Stateless services | A shared state store (cache/DB) | The state has to live somewhere the boxes share |
| Asynchronous communication | Eventual consistency | The result finishes after the response returns |
| Strong consistency | Lower availability under partitions | Reads must block or fail rather than serve stale data |
| High throughput via batching | Higher per-request latency | Each item waits for its batch to fill |
This page isn't one more topic — it's the lens you carry into every other topic. System design is the practice of choosing what to give up, and these recurring either/or decisions are where that choosing actually happens.
Why it matters
- It reframes design from 'pick the best option' to 'pick what to sacrifice', which is the mindset interviewers and senior engineers actually use.
- The same handful of trades — scaling, consistency, sync/async, state, batch/stream, push/pull — recur in almost every system you'll ever build.
- Naming both sides of a decision out loud is the single clearest signal that separates a junior answer from a senior one.
If ignored
- Designs that are presented as all upside, which reads as naïve the moment someone probes the downside.
- Applying one choice everywhere — strong consistency system-wide, or everything synchronous — instead of deciding per use case.
- Making servers stateful by reflex and then hitting a wall when it's time to scale horizontally.
Where it fits
- Sits above every component — it's the reasoning you apply when choosing and combining them.
- Shows up most visibly in the trade-off step of a design, where you justify what you optimized for.
- Applies per piece of data and per request, not as one blanket decision for the whole system.
Related topics
- Consistency models: the strong-vs-eventual trade in full detail
- CAP & PACELC: the formalization of the consistency-vs-availability trade
- Latency & throughput: the batching trade that pits fast-per-request against high-volume
- Architectural patterns: each pattern is a pre-packaged set of these same trades
Interview lens
Questions it unlocks
- What are the trade-offs of your design?
- Why did you choose X over Y here?
- Where are you accepting eventual consistency, and why is that okay?
60-second answer
I frame system design as choosing what to give up, because almost nothing is better on every axis. So for each big decision I name both sides: vertical vs horizontal scaling, strong vs eventual consistency, sync vs async communication, stateful vs stateless services, batch vs stream processing, and push vs pull reads. Then I pick per requirement — strong consistency for money but eventual for feeds, sync for the user's immediate answer but async for slow fan-out work — and I say out loud what I optimized for and what I traded away, because that reasoning is the actual signal in the interview.
Common traps
- Presenting a design as having only upsides, with no acknowledged trade-off.
- Applying one choice (e.g. strong consistency) uniformly instead of per use case.
- Making servers stateful and then struggling to scale horizontally.