System Design HLD-02.07
The core trade-offs map
The trade-offs every design review returns to: consistency, availability, latency, cost, reads vs writes, simplicity, and how to argue them.
The big idea
There is no best architecture, only architectures that fit a set of requirements. Every decision buys something and pays for it somewhere else: a cache buys speed and pays in staleness, a second region buys resilience and pays in cost and consistency, splitting into microservices buys team independence and pays in operational complexity. The skill that separates senior designers is not knowing more components. It is naming the trade-off out loud and tying it to a requirement.
This lesson is a map of the trade-offs that come up again and again. You will see each of them in depth later. For now, the goal is to recognize them, because once you do, most design debates become short: "we are choosing latency over consistency here, because a stale like count is harmless".
How it works
Step 1: The recurring axes
- Consistency vs availability. When the network splits replicas apart, a system must either refuse some requests to stay consistent or keep answering and risk returning old or conflicting data. This is the CAP theorem, in CAP theorem, properly explained .
- Latency vs consistency. Even without failures, making every replica agree before answering takes extra round trips. Reading from a nearby replica is fast but may be slightly behind. PACELC, in PACELC and consistency models , names this.
- Cost vs performance and reliability. More replicas, more regions, more cache memory: each improves something and adds to the bill.
- Read vs write optimization. Indexes, caches and precomputed or denormalized data make reads fast and writes slower and more complex. Append-only logs make writes fast and reads harder.
- Simplicity vs flexibility. A monolith is simple to build, test and deploy; microservices let many teams move independently at the price of networks, versioning and distributed debugging.
Step 2: Different products sit in different places
Here are three designs scored on five axes. Further out means better on that axis:
None of the shapes is wrong. A bank that shows a slightly stale balance is broken; a social feed that shows a like count two seconds late is fine. An MVP that goes down for an hour loses little; a feed with a billion users that goes down for an hour makes the news.
Step 3: How to argue a trade-off
In a design review or interview, a good trade-off statement has four parts:
- The decision: "Serve timelines from a cache that is updated asynchronously."
- What we gain: "Reads stay under 50 ms at 200,000 requests per second."
- What we give up: "A new post can take a few seconds to appear for followers."
- Why that is acceptable: "Users do not notice a few seconds' delay in a feed, and the requirement is read latency."
And, when you can, how you would know if it stops being acceptable: "If complaints about missing posts rise, or the delay exceeds 10 seconds at p99, we revisit."
Try it
Going deeper
Trade-offs change with scale and time
The right point on each axis moves. A startup rightly favors simplicity and low cost; the same product at a billion users must buy availability and latency. A good design document records not just the choice but the conditions under which it should be revisited, so the next team knows what assumption it rests on.
Look for the hidden third option
Many trade-offs are less binary than they look. You can split a system so the parts that need strong consistency (payments) are small and strict, while everything else (feeds, search, analytics) is fast and eventually consistent. Much of good architecture is drawing those boundaries well.
Trade-offs
| Option | Wins when | Loses when |
|---|---|---|
| Favor consistency | Money, inventory, identity and permissions: wrong answers are costly | Latency and availability during network problems |
| Favor availability and latency | Feeds, counters, recommendations, search: stale is harmless, slow is not | Data where conflicting or outdated answers cause real damage |
| Favor simplicity and low cost | Early products and internal tools: ship fast, change easily | Very high scale or strict uptime needs, which simplicity eventually cannot meet |
Common mistakes
- Presenting a design as if it had no downsides. Reviewers then find the downsides for you.
- Choosing the most robust option on every axis. The result is slow, expensive and complex.
- Treating the whole system as one choice. Different data in the same product often deserves different trade-offs.
- Stating trade-offs without tying them to requirements. "Eventual consistency is faster" is a fact, not a justification.
Check yourself
-
A cache in front of the database mainly trades what for what?
Show answer
A. Consistency for latency Reads get faster, but the cache may serve data that is slightly out of date.
-
Which feature most needs strong consistency?
Show answer
B. Inventory for the last item in stock Two customers must not both buy the last item, so everyone must see one agreed stock level.
-
What makes a trade-off statement convincing in a design review?
Show answer
B. Stating the gain, the cost and why the cost is acceptable for the requirements Decision, gain, cost, and why it fits the requirements, ideally with a condition to revisit.
-
Why might one product use both strong and eventual consistency?
Show answer
B. Different data has different needs, so each part gets the trade-off that fits Payments can be strict while feeds and analytics are fast and eventually consistent.
Recap
- Every design decision gains on some axes and pays on others.
- The recurring axes: consistency, availability, latency, cost, read vs write speed, simplicity.
- Different products, and different data in one product, belong at different points.
- State a trade-off as decision, gain, cost and why the cost is acceptable.
- Record when to revisit: the right trade-off changes with scale.
Next up
- Crack the system design round learning path