Guide / System design Senior level
13. Trade-offs and follow-up patterns
Interviewers rarely accept a component without asking “why this?”. Use the pattern: “I chose X over Y because [requirement]. The cost is [downside], which is acceptable because [reason]. If [condition changes], I’d switch to Y.”
13.1 Classic trade-offs#
| Choice | Pick the first when | Pick the second when |
|---|---|---|
| Consistency vs availability | Money, inventory, auth | Feeds, likes, catalog browsing |
| Latency vs consistency | Reads must be fresh (read primary) | Speed matters more (read replica/cache) |
| SQL vs NoSQL | Relations, transactions, ad-hoc queries | Known key access, huge write volume, flexible schema |
| Normalize vs denormalize | Write-heavy, integrity critical | Read-heavy, joins too slow at scale |
| Push vs pull | Few recipients, low latency needed | Many recipients, celebrities, cost control |
| Sync vs async | Caller needs the result now | Work can happen later; bursts; decoupling |
| Monolith vs microservices | Small team, early product | Many teams, divergent scaling needs |
| Strong vs eventual cache consistency | Critical reads | Most reads, with TTL bound |
| Batch vs stream | Accuracy, cost, daily reports | Freshness, alerts, real-time features |
| Polling vs WebSocket vs SSE | Infrequent updates | Bidirectional real time / one-way stream |
| Build vs buy | Core differentiator | Commodity capability |
| Accuracy vs memory | Exact counts needed (billing) | Approximation fine (HLL, sketches for analytics) |
| Pessimistic vs optimistic locking | High contention | Low contention |
13.2 Follow-ups you will hear (prepare an answer for each in your design)#
- Why this database? What is the partition/shard key and why?
- What happens if this component goes down? Is it a single point of failure?
- How does this scale to 10× traffic? What breaks first?
- How do you make this idempotent? What if the client retries?
- How do you keep the cache consistent with the DB?
- How do you handle a hot key / hot partition / celebrity?
- What are the consistency guarantees a user sees?
- How do you handle a connection drop / reconnect?
- How do you monitor it, and what would you alert on?
- How do you deploy changes safely? Roll back?
- How would you test this (load tests, chaos tests, contract tests)?
- What about security, abuse, and rate limits?
- What’s the data retention and archival strategy?
- How do you handle multi-region or data residency?
- What would you do differently with more time or budget?
13.3 Signals that impress#
- Stating assumptions and numbers before designing.
- Naming the bottleneck before the interviewer does.
- Offering two options with trade-offs, then committing to one.
- Talking about failure modes unprompted.
- Keeping the design as simple as the requirements allow (no Kafka for 10 QPS).
- Connecting the design to real experience: “At my last company, we saw X, so I’d do Y.”
13.4 Red flags to avoid#
Jumping into components without requirements; buzzword stacking; no numbers; ignoring the write path; “we’ll just use eventual consistency” for money; drawing a single DB without discussing scale; never mentioning failure; arguing instead of adapting when the interviewer adds a constraint.
13.5 Books and resources for Part 1#
Designing Data-Intensive Applications (Martin Kleppmann) for theory; System Design Interview vols 1–2 (Alex Xu) for question walkthroughs; Hello Interview and ByteByteGo for practice; engineering blogs (Uber, Netflix, Discord, Stripe, Shopify) for real-world case studies.