SkillByAIOpen interactive version →

Lesson 23 / 25

Trade-offs and Bottlenecks

Every choice has a cost.

Name the alternative you rejected

For each major decision, state the alternative and why you chose differently: SQL versus NoSQL, push versus pull, strong versus eventual consistency, cache-aside versus write-through, synchronous versus queued processing. Then walk through bottlenecks: the hottest path, hot keys, single points of failure, and what happens at ten times the load. Close with observability: metrics, logs, traces and alerts on the key service levels.

Trade-offs, communication, practice

Strong candidates explain trade-offs, communicate clearly and practise deliberately.

Figure 8.1 — Trade-offs, communication and practice.

Trade-off phrases that work

Patterns for explaining decisions.

"We could do X, which gives A but costs B. Given requirement R, I would choose Y."
"This is eventually consistent; a like count being a few seconds stale is acceptable."
"The bottleneck at 10x is the database write path; I would shard by user_id."
"If the cache cluster fails, we fall back to the DB with rate limiting to protect it."
"To verify it works in production: p99 latency, error rate, queue age, cache hit ratio."

Volunteer weaknesses

Pointing out the limits of your own design before being asked is a strong senior signal.

Quick check: What makes a design decision well justified in an interview?

  • Linking it to a requirement and naming the alternative's trade-off
  • Using the newest technology
  • Saying it is industry standard without detail
  • Avoiding any mention of downsides
Answer

Linking it to a requirement and naming the alternative's trade-off — Requirements drive trade-offs.