The senior engineer's craft · L2Deep dives and explaining trade-offs

Deep dives and explaining trade-offs

Pick the riskiest part of a design, size it with numbers, compare a few options on your requirements, and say your trade-off in one clear sentence.

L2 SeniorThe senior engineer's craft19 min read
Fact-checked by AI against cited sources · Human review pendingLast reviewed 8 Nov 2026 · How we check content
Section 1 of 8

What broke

A made-up story to show a common failure. Not about a real company.

Ravi had three years of backend experience. He was in a system design interview for a senior role. The task was "design a photo-sharing app". After 20 minutes, his high-level design was fine.

Then he tried to cover everything. Feed: "Kafka and Redis." Storage: "Cassandra, because it scales." Search: "Elasticsearch." He spent about two minutes on each box. None of them had a number.

With 8 minutes left, the interviewer asked a question. "A famous user's post gets tens of millions of likes in its first hour. What happens to your like count?" Ravi said Cassandra handles it. The interviewer asked how many writes one row could take. Ravi did not know, so he said again that the database scales.

The feedback said: "Good breadth, no depth. Could not explain why he chose anything. Defended answers instead of reasoning about them." He got an offer, but at the mid level.

This story is made up, but each mistake in it is common. This lesson shows how those 8 minutes could have gone.

Section 2 of 8

The idea in simple words

A deep dive is the part where you take one hard piece of your design and work it out properly. Hello Interview gives it about 10 minutes of a design interview. You use them to meet the non-functional requirements, handle edge cases and fix bottlenecks. 1

Depth is not knowing many tools. It is sizing one real problem, comparing a few fixes, and picking one for a reason others can check.

That reason is the trade-off. Every fix gives you something and costs you something. Malte Ubl, describing design docs at Google, calls the doc "the place to write down the trade-offs you made". 4 The same habit works when you speak.

The key idea. Pick one risky part. State the problem with a number. Give two or three options. Compare them on the requirements you agreed. Pick one, say what it costs, and say what would change your mind.

Section 3 of 8

How it works

Step through one deep dive on the like counter from the story. Use Next and Back, or the ← and → keys.

One deep dive on a viral like counter: numbers, options, compare, pick, watchDeep dive: likes on one viral post 20,000 likes/sour peak guess1,000 writes/slimit per partitionOne counter row is 20× too slow OptionsA · one counter row (what we have)B · 50 shard rows, add them up on readC · sum in the app, write once a second Compare on our needsABC20,000 likes/s✗✓✓count may lag ≤ 5 s✓✓✓no saved like lost✓✓✗ Pick B: 20,000 ÷ 50 = 400 writes/s per keypages read one total, refreshed each second Watch: throttled writes, total delayChange if: counts must be exact SeniorPath
  1. State the problem with a number. The counter lives in DynamoDB. We guess a viral post peaks at 20,000 likes per second. One partition takes at most 1,000 writes per second. One row cannot keep up.
  2. Give two or three options. Keep one row, split the count across 50 rows, or add likes up in each app server and write once a second.
  3. Compare on the needs you agreed. A is too slow. C can lose the last second or so of likes if a server crashes. Only B meets all three.
  4. Pick, and say the cost. 50 shards cut each key to about 400 writes per second, well under the limit. The cost is reading 50 rows, so a small job sums them each second and pages read that one total.
  5. Say what you would watch and what would change your mind. Track throttled writes and how stale the total gets. If counts had to be exact, you would choose again.
Step 1 of 5

Choose where to go deep

You cannot go deep everywhere, so choose the part most likely to break the design. Good places are:

  • The hardest non-functional requirement, such as a write rate or a latency target. Hello Interview's examples, for a Twitter-like app, are scaling to over 100 million daily users and fast feed loads. 1
  • A bottleneck you noticed and parked during the high-level design.
  • Where the interviewer steers. Xu advises working with the interviewer to choose and rank the parts to go deep on. 3

Skip parts that are interesting but prove little. Xu's example: going into Facebook's EdgeRank feed ranking in detail "is not ideal". 3

Say your choice out loud and check it. "The like counter on viral posts worries me most. Shall I go deep there?"

Step 1. State the problem with numbers

A problem without a number is an opinion. Make a quick back-of-envelope estimate, and label guesses as guesses. See latency numbers and estimation.

Suppose the counter lives in DynamoDB. Most likes on a viral post come in the first few minutes, so guess a peak of 20,000 likes per second. Each like adds 1 to one row. Now find the limit. A DynamoDB partition is designed for at most 1,000 write units per second. One write unit is one write of up to 1 KB per second. 5

DynamoDB stores each item in one partition, chosen by a hash of its key. 7 So one counter row can never get more than one partition's limit. It is about 20 times too slow. It is a hot key.

The limit depends on the store. Firestore's docs give no fixed limit for one document. They say it depends on the workload, and advise load testing. 8 Their counter sample assumes about one increment per second for each shard. 9 Name the store you assume, then use its number.

Step 2. Give two or three options

One option is not a choice. Six options is a list, not a decision. Two or three is enough.

  • A. One counter row. Simple and exact. It fails at our peak.
  • B. Sharded counter. Keep 50 rows for the post, such as post42#1 to post42#50. Each like updates a random one. AWS calls this write sharding with a random suffix. 6 To read the total, you read all the shards and add them up. 9
  • C. Batch in the app. Each app server counts likes in memory and writes the sum once a second. That means few writes. But a crash loses the likes the server has counted and not yet written, about a second's worth. If the app has already shown those likes as saved, they vanish.

Step 3. Compare on the requirements

Do not compare options in general. Compare them on the requirements you wrote at the start. See requirements and non-functional needs. Suppose you agreed on three:

  1. Handle 20,000 likes per second on one post.
  2. The count on the page may lag up to 5 seconds.
  3. A like the user saw succeed must never vanish.

A fails the first. C fails the third. B meets all three, but it moves the cost to reads. Firestore's docs say read cost grows in step with the number of shards. Too many shards make reads slow and expensive. 9

So add one small piece. A job sums the shards each second and stores the total. Pages read that one value. Firestore's docs describe this kind of roll-up, at the cost of a total that lags behind. 9 Requirement 2 allows that lag.

Step 4. Pick, with a trade-off sentence

Use one sentence shape every time:

"X gives us A at the cost of B. Given requirement R, that is the right call."

For the counter: "50 shards cut each key to about 400 writes per second, well under the 1,000 limit, at the cost of reading 50 rows for a total. The count may lag 5 seconds, so we read a cached total, and that cost is fine."

The numbers are simple: 20,000 ÷ 50 = 400 writes per second for each shard key. That leaves room even if two shard keys land on the same partition.

The sentence names the gain, the cost and the deciding requirement. A listener can check, or challenge, each part.

Step 5. Say what you would watch, and what would change your mind

End with how you would know it is going wrong. For the counter, watch throttled writes and how stale the total gets.

Then name what would flip the decision. If counts had to be exact, like votes in an election, a cached total would not be enough. If only a few posts ever go viral, you could shard only those keys and keep one row for the rest.

Xu's advice fits here: never say your design is perfect, because "there is always something to improve upon". 3

When the interviewer pushes back

A question is usually a hint, not an attack. Improving the design based on the interviewer's probes is part of the deep dive. 1 Hello Interview warns against talking over the interviewer, and says to leave room for questions. 1

So update, do not defend. "Good point. In that case B breaks here, and I would change this part." Changing your mind for a stated reason is a strong signal. Repeating "it scales" is a weak one.

Common failure modes

Defending instead of updating is one. Here are three more.

  • Listing technologies. "Kafka and Redis" is not a design. Say what each one does, and for which requirement.
  • Going deep everywhere. Two minutes on each of six parts shows no depth at all.
  • No numbers. Without a rate and a limit, nobody can check your choice.

How depth is judged at each level

Hello Interview describes what interviewers expect at each level. 2

  • Mid-level: "the expectation for depth is limited". You lead the early parts, and the interviewer may lead more later.
  • Senior: go deep in "around 2 places", using your real experience. You spot limits in your own design and discuss alternatives.
  • Staff: depth "in multiple areas". You foresee problems and lead almost the whole interview.

Hello Interview also says senior candidates should find the weak spots themselves and lead the discussion. 1 A later lesson, level calibration, covers levels in more detail.

Section 4 of 8

Trade-offs

Way to spend the deep-dive timeShows depth?CostUse it when
Go deep on 1–2 risky partsYes Other parts stay at high level.Almost always.
Cover every part brieflyNo Sounds like a list of tools.Never as the main plan.
Go deep on a part you know well but that is low riskPartly.Proves skill, but not that the design works.Only if the interviewer asks for it.
Propose a part, then check with the interviewerYes A few seconds.Every time.

Simple rule: one risky part, with numbers, two or three options, one trade-off sentence, and one thing you would watch.

Section 5 of 8

At work: how a senior uses this

A design review is a slow deep dive. The same shape works there.

  • Ask "what is the riskiest part of this design, and how deep did we go on it?"
  • Ask for the number behind each worry: the rate, the limit and the room left.
  • Write the trade-off sentence in the "alternatives considered" section of the design doc. Ubl says this section shows "why the selected solution is the best given the project goals". 4
  • Turn "what I would watch" into a dashboard or an alert before launch.
  • When a reviewer pushes back, repeat their point in your words. Then ask if it changes a requirement or only the design.
  • Keep one review meeting to one or two deep dives. Park the rest as open questions.
Section 6 of 8

With AI

What to ask the agent

"Here is my high-level design and my requirements. Which one part is most likely to break first, and why? Give me the number that shows it."

"Give me exactly three options for this part. Compare them only on these three requirements, in a table. Do not add new requirements."

"Act as an interviewer. Probe my sharded counter design with one hard question at a time, and tell me if I defend instead of updating."

What to check yourself

  • Every limit the agent quotes matches the docs of the store you chose. Agents often mix up stores and units.
  • The comparison uses your requirements, not general pros and cons.
  • You can say the trade-off sentence without notes: gain, cost, deciding requirement.
  • You know what would change your mind. If you cannot say it, you have not finished the deep dive.
Section 7 of 8

Check yourself

1. You have 10 minutes left in a design interview. Where should you go deep?

Show answer

On the part most likely to break a non-functional requirement, after checking with the interviewer. A deep dive should prove the design meets its hardest requirement. Checking first means you spend the time where the interviewer wants it.

2. Which sentence is the best way to state a trade-off?

Show answer

50 shards cut each key to about 400 writes per second, at the cost of reading 50 rows. The count may lag 5 seconds, so a job can sum them once a second and pages read one total. It names the gain, the cost and the requirement that decides. A listener can check each part.

3. One DynamoDB partition is designed for at most 1,000 write units per second. A viral post gets 20,000 likes per second on one counter row. What is the problem?

Show answer

The row is a hot key. All writes go to one partition, about 20 times its limit. DynamoDB stores each item in one partition, so its limit applies no matter how big the table is. You need to spread the writes, for example with shards.

4. The interviewer asks, "What if a server crashes while it holds a second of likes in memory?" What is the best response?

Show answer

Agree that those likes would be lost, check it against the requirements, and change the design if needed. Probes are part of the deep dive. Updating with a reason shows judgement. Defending a weak point does not.

Your progress is saved only in this browser. Export it to keep it safe.

Was this clear?
Report a mistake (opens GitHub in a new tab)
Section 8 of 8

Go deeper

Show 9 sources and related lessons
  1. Hello Interview, “System Design Delivery Framework” (System Design in a Hurry) (opens in a new tab)
    The deep-dive step, its time box, who should lead it at each level, and the warning about talking over the interviewer.
  2. Hello Interview, “The System Design Interview: What is Expected at Each Level” (opens in a new tab)
    How much depth, and how much leading, interviewers expect from mid-level, senior and staff candidates.
  3. Alex Xu, System Design Interview – An Insider's Guide, “A Framework for System Design Interviews” (ByteByteGo) (opens in a new tab)
    The design deep-dive and wrap-up steps, with advice on time, on unhelpful detail and on never calling a design perfect.
  4. Malte Ubl, “Design Docs at Google” (Industrial Empathy) (opens in a new tab)
    Why a design doc should focus on trade-offs, and what the "alternatives considered" section is for.
  5. Amazon DynamoDB Developer Guide, “Best practices for designing and using partition keys effectively” (opens in a new tab)
    The read and write limits of one DynamoDB partition, and what a read unit and a write unit are.
  6. Amazon DynamoDB Developer Guide, “Using write sharding to distribute workloads evenly” (opens in a new tab)
    Adding a random or calculated suffix to a key to spread writes, and the extra work it adds to reads.
  7. Amazon DynamoDB Developer Guide, “Partitions and data distribution in DynamoDB” (opens in a new tab)
    How DynamoDB hashes the partition key of each item to choose the one partition that stores it.
  8. Firebase documentation, “Best practices for Cloud Firestore” (opens in a new tab)
    Why the highest update rate for one document depends on the workload, and the advice to load test.
  9. Firebase documentation, “Distributed counters” (Cloud Firestore) (opens in a new tab)
    How a counter split into shards works, how read cost grows with the number of shards, and the roll-up alternative.

Related: The system design method, worked on Ticketmaster · Making architecture trade-offs · Requirements and non-functional needs · Design docs and RFCs · Latency numbers and back-of-envelope maths · What interviewers expect at each level (coming soon)

Term

See full entry

Jump to a section

  1. 1What broke
  2. 2The idea in simple words
  3. 3How it works
  4. 4Trade-offs
  5. 5At work
  6. 6With AI
  7. 7Check yourself
  8. 8Go deeper