Trade-offs & Bottlenecks
Reason clearly about latency vs. throughput, read vs. write tuning, and hot-key bottlenecks.
In plain words
Every design choice gives you something and costs you something else. Good engineers name the trade-off out loud and find the one part that will break first.
Think of it like…
Packing for a hike: every extra gadget adds capability (features) but adds weight to your pack (latency, cost, operational complexity).
Where you’ve seen it
Adding a cache makes reads much faster, but users may briefly see old data. For a like-counter that’s fine; for a bank balance it isn’t.
Words you’ll hear
- Trade-off
- Gaining one quality (speed) by giving up another (freshness).
- Bottleneck
- The slowest component that limits the whole system.
- Latency vs throughput
- Time per request versus requests handled per second.
- Hot spot
- One key or server receiving far more traffic than the others.
Visual diagram
Theory & deep dive
How senior engineers talk about trade-offs
Every box you add to an architecture fixes one problem and introduces another. Adding Redis speeds up reads 20×, but introduces stale data and cache invalidation. Adding Microservices lets teams deploy independently, but turns fast function calls into slower network hops. Adding Sharding scales writes, but kills cross-shard JOINs.
Whenever you propose a component, immediately state: "This gives us X, at the cost of Y, and we mitigate Y with Z."
How it works, step by step
Step 1 of 41. Distinguish Latency vs. Throughput
Latency is time for one request (ms); throughput is requests/sec (QPS). Batching boosts throughput by amortizing overhead, at the cost of higher per-item latency.
- Latency
- ms per request
- Throughput
- QPS / MB/s
When to use it & trade-offs
What it is
Every architectural choice trades one property for another - latency vs. throughput, consistency vs. availability, storage cost vs. CPU compute, and simplicity vs. flexibility.
Why it matters: Senior system design interviews are graded primarily on your ability to spot bottlenecks early and articulate concrete trade-offs rather than drawing buzzwords.
When to reach for it
- Proactively surfacing 2–3 bottlenecks at the end of every HLD interview
- Using Little’s Law (
L = λ · W) to size worker pools and DB connections - Addressing Zipf/power-law skew on viral content, hot shards, and celebrity accounts
When to avoid or be careful
- Saying “this choice has no downsides” - every design decision trades something
- Optimizing for 100k QPS writes when the prompt is 100k QPS reads and 10 QPS writes
Classic System Design Trade-Off Pairs
Strengths: Batching 100 events into 1 DB insert cuts IOPS 100×.
Watch out: Adds buffering delay (100 ms – minutes) to each individual item.
Strengths: Precomputing feeds makes reads O(1); lazy evaluation skips wasted work for inactive users.
Watch out: Push amplifies write cost for high-fanout entities; Pull increases read complexity.
Strengths: Normalized avoids update anomalies; Denormalized avoids expensive distributed joins.
Watch out: Denormalized data requires careful async sync when fields change.
Interview signals & numbers to know
When this topic comes up
- bottlenecks
- trade-offs
- tail latency
- hot key
- read vs write
Benchmarks & rules of thumb
- Little’s Law
- Concurrency = QPS × Latency
- Tail at Scale (20 calls @ P99)
- 18% chance of slow response
- Zipf 80/20 rule
- 20% keys = 80% traffic
- Hedged request trigger
- At P95 threshold
Common mistakes & follow-ups
Common interview mistakes
- Ignoring hot-key skew after saying “we sharded across 32 nodes so load is 1/32 each”
- Using hedged requests without idempotency or load caps (can double load during an actual overload)
- Over-engineering complex multi-region active-active when single-region Multi-AZ + CDN solves the requirements
Likely interviewer follow-ups
- Why does fetching 50 microservices in parallel cause tail latency (
P99) to explode, and how do hedged requests help? - If one viral product receives 50,000 req/s on a sharded Redis cluster, how do you protect that single shard?
- Apply Little’s Law: at 5,000 QPS with 200 ms avg latency, how many concurrent worker threads/slots are busy?
Knowledge check
Put it into practice
Design full architectures with AI feedback
Apply Trade-offs & Bottlenecks inside real High-Level Design prompts or review Q&A flashcards.