a system design guide
How to practise for the system design interview
By Majid Ali, founder of Bytecrest · · 9-minute read
Short answer
Practise the system design interview by working the same five steps on every problem: ask clarifying questions, write notes, estimate the numbers, build the architecture, then defend the trade-offs. Give every requirement a number. Say your reasoning out loud. Then break your own design to see where it fails first.
A system design interview is not a quiz with one right answer. It is a conversation about how you think. Interviewers watch whether you ask before you build, whether you size things with numbers, and whether you can say what a choice costs. This guide gives you a repeatable method and a worked example, so you have something concrete to practise.
What are the steps of a system design interview?
Every problem can be worked in the same order. ByteLab calls these the Design Steps, and each of its ten Design Problems walks through them.
- Clarifying questions. Find the scale, the retention, the latency target and what is out of scope before you draw anything.
- Notes. Write what the system must do, the qualities it needs (each with a number), the API, the data, the main flows, the bottlenecks and how it scales.
- Estimates. Turn the assumptions into requests per second, storage and memory.
- Architecture. Pick the components and connect them. Check that the design survives the load.
- Trade-offs. Say why you chose each part, what it costs, and what you would change if the load doubled.
Now let us run all five on one problem.
How do clarifying questions work? A URL shortener example
The prompt is short: design a service like bit.ly. A user pastes a long URL and gets a short link. Anyone who opens the short link is redirected. Do not start drawing. Ask three things first, because they decide everything else.
- Scale: 26 million new links a month, and each link is followed about 100 times. At the busiest moment, traffic is twice the average.
- Retention and size: links are kept 5 years, and one record is about 500 bytes.
- Latency: the 99th percentile of a redirect must be under 100 ms.
Also ask what is out of scope. Here, custom aliases and click analytics wait for a later version. Stating that list is part of the answer.
How do you do the estimates?
Work from the assumptions, show each step, and keep the units. A month is 30 days × 86,400 seconds = 2,592,000 seconds.
| Estimate | Working | Result |
|---|---|---|
| Link creations per second | 26,000,000 ÷ (30 × 86,400 s = 2,592,000 s) | 10.03 / s |
| Redirects per second at peak | 10.03 × 100 reads per link = 1,003 average; × 2 for the busiest moment | 2,006 / s |
| Links in 5 years | 26,000,000 × 12 months × 5 years | 1.56 billion |
| Storage | 1.56 billion × 500 bytes | 780 GB |
| Short code length | 62^5 = 916 million is too small; 62^6 = 56.8 billion is enough | 6 characters |
| Cache for the hottest fifth of a day | 1,003 × 86,400 = 86.7 million reads; 20% = 17.3 million × 500 bytes | 8.67 GB |
Read the result, not just the sum. 780 GB fits on one modern database, so you do not need sharding yet. Only 10 writes a second means the write path is tiny. About 2,000 redirects a second, almost all reads of a hot set of links, points at a cache.
How do you choose the architecture?
Follow one request. A redirect goes from the client to a load balancer, then to a stateless app server. The app looks the code up in the cache. A hit returns the redirect at once. A miss reads the database, fills the cache and returns.
Then ask where it breaks first. Without a cache, the database sees every redirect, about 2,000 reads a second. That is the first limit. The next is the app servers, because CPU is the cost of every request. Capacity = vCPUs ÷ CPU time per request is the sum to keep in your head. See the caching guide and the load balancing guide for the maths behind those two boxes.
What trade-offs should you state?
A design without trade-offs sounds like a design nobody has tested. For the cache, say what it costs: a machine, a second copy of every hot record, and a cold start. After an edit or a delete, a redirect can go stale unless you remove the cache entry. If reads doubled, add app servers first, because they are stateless and cheap, and watch the hit ratio.
Choices like 301 against 302 are trade-offs too. A 301 lets browsers cache the redirect and saves your servers, but you never see repeat clicks. A 302 sends every click to you.
Which numbers should you have ready?
- Requests per second = daily users × actions each ÷ 86,400. Round 86,400 to 100,000 for speed. Multiply by a peak factor: 2 to 3 for a consumer app, 5 to 10 for a sale or a match. Size for the peak, not the average.
- Capacity = vCPUs ÷ CPU time per request. 2 vCPUs at 10 ms each is 200 requests a second. Plan for about 70% of that.
- Percentiles: p99 is the latency 99 out of 100 requests beat. Averages hide the slow tail. If a page makes 20 backend calls and each is slow 1% of the time, 0.9920 = 82% of page loads are fast, so 18% hit at least one slow call.
- Example: 200,000 daily users × 30 actions ÷ 86,400 ≈ 69 requests a second on average, and about 208 at a peak factor of 3. One 200-request server is already over its limit.
Which problems should you practise?
Practise problems that stress different parts of the toolbox. ByteLab has ten Design Problems, each with clarifying questions, reference notes, worked estimates, a simulator to build in and a trade-off write-up.
- URL shortenerA read-heavy service with a hot set of popular links.
- Rate limiterA fair quota per API key across a whole fleet of gateways.
- News feedThe fan-out trade-off, with a few accounts that have 100,000 followers.
- Chat systemReal-time delivery, ordering, history and a queue for bursts.
- NotificationsPush, SMS and email with a provider that has fixed capacity.
- Nearby driversA flood of position pings and a geo-index that must not be too fine or too coarse.
- Video streamingEncoding pools, a CDN that spares the origin and uploads that survive dropped connections.
- Payment railA double-entry ledger: no double charges and no lost payments.
- TypeaheadA request on every keystroke and a ranking that must stay fresh.
- Distributed logPartitions, replicas, consumer groups, retention and leader election.
A practice routine that works
- Pick one problem. Write the clarifying questions yourself before you look at any answer.
- Do the estimates on paper. Check them against the reference.
- Build the design, then run it under load. Find which part saturates first.
- Break it: crash a server, expire the cache, double the traffic. Fix what fails.
- Explain your trade-offs out loud, as if to an interviewer. Record yourself if you can bear it.
- Repeat with a problem that stresses something different.
Common mistakes
- Drawing boxes before asking questions. You will design for the wrong scale.
- Using adjectives instead of numbers. “Fast” and “highly available” mean nothing. “p99 under 100 ms” and “99.9% uptime, about 8.8 hours of downtime a year” do.
- Sizing from the average. The peak decides whether you survive.
- Adding components you cannot justify. Every box has a cost. If you cannot say what it solves, drop it.
- Skipping failure. Say what happens when a server, the cache or the database dies.
- Memorising answers. A changed number should change your design. If it does not, you memorised.
Try it yourself
Reading a worked example helps. Building it and watching it fail helps more. The URL shortener is the first Design Problem and it is free to open. No sign-up is needed.
Walk the Design Steps on the URL shortener, then run your own design under load.
Frequently asked questions
How do I practise for a system design interview?
Work the same sequence on every problem: ask clarifying questions, write notes, do the estimates, build the architecture, then defend the trade-offs. Say your numbers out loud, and test the design by breaking it. Reading answers is not enough. You learn the most from watching your own design fail under load.
How long does it take to prepare?
It depends on your starting point, so be wary of anyone who gives one number. A better test is whether you can take a new problem from first question to trade-offs without help, with every requirement stated as a number. Keep going until that feels routine.
What maths do I need?
Basic arithmetic. Requests per second = daily users × actions each ÷ 86,400, times a peak factor of 2 to 3 for a consumer app. Capacity = vCPUs ÷ CPU time per request. Storage = items per day × size × days kept. Round freely, but keep your units straight.
Do I need to memorise architectures?
No. Interviewers want your reasoning: what the bottleneck is, what you would add, and what it costs. A cache, a load balancer and a replica are tools. The skill is knowing which problem each one solves, and what it breaks.
Related guides
- Caching explainedCache-aside, TTLs, stampedes and how big a cache needs to be.
- Load balancing explainedRound robin against least connections, health checks and the capacity maths behind adding servers.
- All system design guidesThe full set, each with a hands-on Lesson.
- ByteLabThe system design simulator behind these numbers.