Skip to content
System design course
Ch.3 · Trade-offs that define a design·how to build it ·8 min read

A trade-off cheat sheet

Every trade-off in this chapter on one page, plus a drill for stating the choice, the gain, and the cost in a single fluent sentence.


How to use this

By now you have the exchanges. The interview skill is recalling the right one instantly and stating it cleanly — choice, gain, and cost — in one breath. This is the one-page index, then a drill to make it fluent. It’s the capstone before you apply all of it to real systems in Chapter 4.

The master table

Trade-offPick A when…Pick B when…
Strong vs eventual consistencyA read must see the latest write (money, inventory)Staleness is harmless (feeds, counts) — buys latency + availability
Latency vs throughputInteractive path; p99 mattersBulk/background; total volume matters
ACID vs BASEInvariants must hold; transactionsScale + availability over strict freshness
Read-through vs write-throughRead-heavy; lazy-load + TTLWrites must be instantly visible
Batch vs streamCompleteness over freshness; cheaperReact in real time; freshness over cost
Load balancer vs API gatewaySpread load across identical serversManage auth/routing/limits across services
Gateway vs direct exposureMany services/public API; central controlInternal calls; avoid the extra hop
Proxy vs reverse proxyActing for clients (egress, filtering)Acting for servers (LB, TLS, caching)
Gateway vs reverse proxyNeed API awareness (auth, quotas, aggregation)Just TLS/caching/load-balancing
SQL vs NoSQLTransactions, joins, strong consistencyScale, flexible schema, known access patterns
Primary-replica vs P2PSimple consistency; read scalingWrite availability; no single bottleneck
Compression vs dedupRedundancy within an itemRedundancy across items (often both)
Server- vs client-side cacheShared hot data; need invalidation controlEliminate the request; static/own data
REST vs RPCPublic, cacheable, resource CRUDInternal, high-perf, typed, streaming
Polling/WS/webhooksMatch direction + frequency(server↔server async → webhooks)
CDN vs originStatic/cacheable, wide audienceDynamic, personal, must be fresh
Serverless vs serversSpiky/event-driven; pay-per-useSteady load; stateful; latency-critical
Stateful vs statelessInherent state (DB, sockets) — contain itApp/API tier — push state to a shared store
Hybrid vs all-cloudCompliance/latency/existing DCElasticity, simplicity, greenfield
Token vs leaky bucketTolerate bursts, cap averageEnforce a strictly smooth rate
Read-heavy vs write-heavyCache + replicas + denormalizeShard + queue + write-optimized store

The one-sentence formula

Every trade-off statement should have three clauses:

“I’ll [choice], which [gain], at the cost of [cost] — acceptable here because [requirement].”

Examples:

  • “I’ll serve the feed from read replicas, which scales reads and cuts latency, at the cost of eventual consistency — fine because a few seconds of staleness is invisible in a feed.”
  • “I’ll shard the events table by user id, which removes the single-primary write bottleneck, at the cost of cross-shard analytics needing scatter-gather — acceptable because reporting is offline and batched.”
  • “I’ll rate-limit with a token bucket, which tolerates natural bursts while capping the average, at the cost of brief over-limit spikes — fine for a public API.”

Drill: complete the sentence

For each, name choice + gain + cost out loud:

  1. A photo-sharing app’s image delivery → CDN: edge latency + origin offload, at the cost of cache-invalidation (solved with versioned URLs).
  2. A bank’s ledger writes → ACID/strong + CP: correctness, at the cost of latency and refusing writes during a partition — required for money.
  3. A metrics ingestion pipeline → write-optimized + queue + stream: write throughput and freshness, at the cost of eventual consistency and pipeline complexity.
  4. A chat app’s message transport → WebSockets: low-latency bidirectional push, at the cost of stateful connections needing a pub/sub backplane.

The takeaway

There is no “right” architecture — only the one whose costs you chose on purpose. If you can attach the three-clause sentence to every major decision, you will sound like someone who has built systems, not memorized them. Now take it to Chapter 4 and design real ones.