How to Run a Deep Dive in a System Design Interview
This lesson is for software engineers at mid-level and above who can already sketch a high-level design and want to score in the second half of the interview. Once your boxes and arrows are on the whiteboard, the interviewer will ask you to go deeper on one or two parts. That is where most of the "senior" signal comes from, and where many candidates stall because they either restate the diagram or list technologies without deciding anything.
By the end you will be able to pick the right component to dig into, run a deep dive with a repeatable structure, and recognize the handful of deep dives that come up again and again.
What the interviewer is scoring here
SmartIntervu's system design rubric scores five things: requirements, high-level design, deep dive and scalability, trade-offs, and communication. The deep dive feeds two of them directly. "Deep dive and scalability" asks whether you can find where the design breaks under load or failure and fix it. "Trade-offs" asks whether you can name the cost of each fix and choose with a reason.
The AI interviewer, like a human one, usually opens this phase with a prompt such as "What happens when a celebrity with 30 million followers posts?" or "Walk me through how a message actually reaches the recipient." If you have time left after the high-level design, you can also choose the deep dive yourself, which is a strong signal that you know where the risk is.
Choosing what to go deep on
Go deep where scale or correctness bites, not where the technology is most interesting. Three questions find that spot quickly:
Which path carries the most traffic? Use the numbers from your estimate. If reads outnumber writes 100 to 1, the read path deserves the attention.
Where would a bug lose money or data? Payments, inventory, message delivery and anything with "exactly once" in the requirements.
Where is the load uneven? A single popular user, product, key or chat group can overwhelm one partition even when the average looks fine.
If your answer to all three points at the same component, start there. Say out loud why you picked it: "Most of the risk is in message delivery, so I'd like to go deep there." That sentence alone shows prioritization.
A repeatable structure for any deep dive
Use the same five steps every time. They keep you from wandering, and they map onto what the rubric rewards.
State the problem with numbers. "At peak we deliver about 350,000 messages per second, and a 500-member group turns one send into 500 deliveries." A problem without numbers cannot be judged as solved.
Lay out two or three options. Real alternatives, each described in a sentence or two, not a list of product names.
Name the trade-off. What each option costs: latency, storage, consistency, operational complexity, money.
Decide. Pick one for this system's requirements, and say what would make you change your mind.
Cover the failure mode and how you would detect it. What breaks, what the user sees, and which metric or alert tells you it happened.
Tip
If the interviewer interrupts with a curveball, answer it inside the same structure. "That changes the numbers. With 100,000-member channels, option two no longer fits, so I'd switch to..." shows you are reasoning, not reciting.
Deep dives that come up again and again
You do not need a memorized answer for each, but you should know the shape of a strong one.
Hot partitions
Data is split across partitions by a key, and one key gets far more traffic than the rest: a celebrity's profile, a viral product, a popular chat group. A strong answer notices this before being asked, then offers fixes: split the hot key across several sub-keys (for example appending a suffix from 0 to 9 and reading all ten), put a cache in front of it, or give very large entities their own handling path. The cost of splitting is that reads now gather from several places.
Fan-out on write vs fan-out on read
For feeds and timelines, fan-out on write pushes each new post into every follower's precomputed feed, making reads cheap and writes expensive. Fan-out on read assembles the feed when the user opens it, making writes cheap and reads expensive. A strong answer uses the follower distribution to choose a hybrid: fan out on write for ordinary accounts, and merge posts from very large accounts at read time, because pushing one post into 30 million feeds would take minutes and waste work on followers who never look.
Idempotency and exactly-once effects
Networks retry, so the same request can arrive twice. True exactly-once delivery between independent systems is not achievable in general, but exactly-once effects are. A strong answer has the client generate an idempotency key, has the server store that key with the result in the same transaction as the side effect, and returns the stored result when the key repeats. Pair at-least-once delivery from a queue with an idempotent consumer and the effect happens once.
Rate limiting
Usually a token bucket or sliding window per user or API key, enforced at the gateway. A strong answer covers where the counters live (a shared store such as Redis, using an atomic increment with an expiry so all gateway nodes agree), what happens when that store is unreachable (fail open for a social feed, fail closed for a login endpoint under attack), and what the client sees (HTTP 429 with a retry-after header).
Counters at scale
Likes, views and inventory counts look trivial until millions of increments per minute land on one row. Options: shard the counter into N rows and sum them on read, buffer increments in memory and flush in batches, or accept an approximate count. For counting unique visitors, a HyperLogLog sketch estimates cardinality in a few kilobytes with a standard error of about 1 percent. The decision depends on whether the number must be exact; inventory must be, a view count need not be.
Ordering
Users expect messages in a conversation to appear in order, but timestamps from different servers disagree because clocks drift. A strong answer assigns a sequence number per conversation from a single authority (the partition that owns the conversation), and only promises order within a conversation, not globally. Queues such as Kafka also only order within a partition, so the partition key must be the conversation ID.
Worked example: message fan-out in a chat system
The prompt: design a chat system with one-to-one and group conversations, groups of up to 500 members. You have the high-level design: clients hold a WebSocket to a connection server, a chat service persists messages, a store holds history. The interviewer asks how a message reaches every recipient.
Weak answer
"The chat service saves the message and then sends it to the recipients through a message queue like Kafka, which scales horizontally, so it can handle the load."
It names a technology and stops. There are no numbers, no explanation of how the service finds the recipient's connection, nothing about offline users, and no failure handling. On the rubric this scores low on both deep dive and trade-offs.
Strong answer
The problem in numbers. Assume 50 million daily active users sending 40 messages a day:
50,000,000 users x 40 messages = 2,000,000,000 messages/day
2,000,000,000 / 86,400 s = about 23,000 messages/s average
peak at 3x average = about 70,000 messages/s
average 5 recipients per send = about 350,000 deliveries/s at peakThe options.
Direct routing. A session registry maps each online user to the connection server holding their socket. The chat service looks up each recipient and forwards the message to that server, which pushes it down the socket.
Pub/sub per conversation. Each connection server subscribes to a channel for every conversation its connected users belong to. The chat service publishes once per message, and every subscribed server receives it.
Pull for very large channels. Clients poll or fetch on notification instead of receiving pushes, which only makes sense for broadcast channels with tens of thousands of members.
The trade-off. Direct routing costs one registry lookup per recipient, so a 500-member group means 500 lookups, but delivery is targeted. Pub/sub publishes once, yet each connection server must track subscriptions for every conversation of every user it holds, and subscriptions churn every time a user connects or disconnects. Pull is cheap for the server but adds latency and only fits groups far larger than 500.
The decision. With groups capped at 500, direct routing is simplest. The chat service batches lookups per group (one multi-get against the registry), groups recipients by connection server, and sends one batch per server rather than one call per recipient. If the product later adds 100,000-member channels, those switch to pull with a push notification.
Order of operations and offline users. Persist first, then deliver. The chat service writes the message with its per-conversation sequence number, acknowledges the sender, then fans out. Recipients who are offline have no registry entry; when they reconnect, the client sends the last sequence number it saw for each conversation and fetches everything newer. That same sync path repairs any delivery that was lost in flight.
Failure mode and detection. If a connection server crashes, its users' sockets drop and in-flight pushes are lost. Nothing is lost permanently because messages were persisted before delivery, and reconnecting clients resync from their last sequence number. Clients reconnect with jittered exponential backoff so 50,000 sockets do not all hit the remaining servers in the same second. To detect trouble, track delivery latency from persist to push at the 99th percentile, the rate of resync fetches (a spike means pushes are failing), and registry lookup errors.
That answer takes about eight minutes to say, and every part of it lines up with the rubric: a problem stated in numbers, real options, a stated cost for each, a decision with a condition for changing it, and a failure plan with metrics.
Mistakes that cost points
Going deep on something safe. Explaining how a load balancer works in detail when the risky part is the write path. Pick the component with the most risk, and say why.
Listing options without choosing. "We could use A, B or C" earns little. Choose, and give the reason tied to this system's requirements.
Forgetting the failure mode. Every deep dive should answer "what happens when this breaks, and how would we know?"
Numbers that do not connect. If your estimate said 70,000 writes per second, your deep dive should use 70,000, not a new number.
Defending a choice after the interviewer shows a flaw. Treat pushback as new requirements. Adjusting the design is a good signal, not a loss.
Practice it
Today, take one deep dive from the list above and write the five steps for it on paper in under ten minutes. Then run a full interview and ask yourself, at the 25-minute mark, which component carries the most risk.
Design a Real-Time Chat System lets you rehearse the fan-out deep dive from this lesson end to end.
Design a URL Shortener is a good place to drill hot keys and read-path caching.
For the building blocks you will reach for in these deep dives, continue with Choosing and Scaling a Database.
Practise this in a mock interview
Try what this lesson covers out loud: the AI interviewer asks one of these questions, follows up, and scores your answer.
- Design a URL ShortenerSystem Design · Medium
- Design a Rate Limiter ServiceSystem Design · Medium
- Design Live Score Alert FanoutSystem Design · Medium
- Design a Video Upload and Transcoding PipelineSystem Design · Medium
Read next
- Choosing and Scaling a Database
Choose a database from the data's access patterns, explain how indexes, replicas and shards change performance and what each costs, and walk through two storage decisions with numbers.
8 min read
- Caching in Depth
Place a cache, choose its read and write pattern, TTL and eviction, handle stampedes, hot keys and lookups for missing keys, and calculate how much load it takes off the database.
8 min read
- Load Balancing in Depth
Choose between Layer 4 and Layer 7, match the algorithm to the traffic, design health checks, drain long-lived connections, remove the load balancer as a single point of failure, and route users across regions.
8 min read
- Queues and Event Streams in Depth
Choose between a message queue and an event log, state delivery semantics and ordering scope, size partitions and consumers, and handle lag, poison messages and the dual-write problem.
9 min read
