A system design interview gives you about 45 minutes and a vague prompt like "design a restaurant reservation system". Without a plan, it's easy to spend 20 minutes on a database choice and never draw a working system. The Interview Approach is a fixed order of six steps. Each step puts something on the board, and each one feeds the next.
The six steps#
The steps fall into two halves. Steps 1 to 4 decide what you are building and who uses it. Steps 5 and 6 decide how: first a design that works, then a design that works at scale.
| # | Step | Time | What goes on the board |
|---|---|---|---|
| 1 | Functional requirements | ~4 min | 3–5 "Users can…" lines and an out-of-scope list |
| 2 | Non-functional requirements | ~4 min | 3–5 qualities with numbers: scale, latency, consistency, availability |
| 3 | Actors | ~2 min | Who uses the system, and what each one does |
| 4 | API routing | ~5 min | Endpoints grouped by actor, and the path a request takes |
| 5 | High-level design | ~12 min | The basic boxes and arrows that make each functional requirement work |
| 6 | Address the non-functional requirements | ~15 min | Changes to the design that meet each quality, with the trade-off |
Leave about 3 minutes at the end to recap. Keep each step's output visible on the board, and tick items off as the design covers them.
The rest of this page runs all six steps on one problem: design a restaurant reservation system.
1. Functional requirements#
Functional requirements say what the system does. The prompt is vague on purpose, so your first job is to narrow it down to the few features that matter. Ask who uses the system and what the most important action is, then write the answer as short "Users can…" lines.
For restaurant reservations:
- Guests can search restaurants by city, date, time and party size.
- Guests can book a table for a time slot.
- Guests can cancel a booking.
- Restaurant staff can set their tables and opening hours, and see the day's bookings.
Then say what you are leaving out, so you and the interviewer agree on the scope: payments and deposits, reviews, waitlists and loyalty points.
Stop at five lines. Every extra feature is one more flow to draw in step 5. Before you move on, ask the interviewer: "Does this cover what you had in mind?"
2. Non-functional requirements#
Functional requirements say what the system does. Non-functional requirements say how well it must do it. "It should be fast" doesn't help you decide anything, so give each quality a number or a clear rule.
| Quality | Question to ask | Restaurant reservations |
|---|---|---|
| Scale | How many users, how many requests? | 50,000 restaurants, 2 million bookings a day, about 100 searches per booking |
| Latency | How fast must the key action feel? | Search returns in under 300 ms at p99 |
| Consistency | Where is stale or wrong data unacceptable? | A table slot is never booked twice. Search results may be a few seconds stale |
| Availability | What must stay up when parts fail? | Search stays up. A booking may fail and be retried, but never double-books |
| Traffic shape | Are there spikes? | Friday and Saturday evenings, and the moment a popular restaurant opens bookings |
Notice that consistency and availability are chosen per feature, not for the whole system. Bookings pick correctness. Search picks availability. Saying this out loud shows you understand the CAP trade-off.
Do the math only when it changes a decision. Number Estimation has the numbers and method. Here, a quick estimate settles two questions:
- Writes: 2 million bookings ÷ 86,400 seconds ≈ 23 per second, so about 230 at a 10× peak. One relational database handles that, so you don't need to shard for writes.
- Reads: 100 searches per booking ≈ 2,300 per second, so about 23,000 at peak. That's too much for one database to compute availability on every request, so search will need help in step 6.
Confirm the list with the interviewer before you move on. These numbers are what step 6 will design against.
3. Actors#
Actors are everyone and everything that uses the system: people in different roles, and outside systems that call it or that it calls. Listing them takes two minutes and tells you how to group the API and who may call what.
| Actor | Kind | What they do | Access |
|---|---|---|---|
| Guest | Person | Search, book, cancel | Search is public. Booking needs a signed-in guest |
| Restaurant staff | Person | Manage tables and hours, see bookings | Staff role, limited to their own restaurant |
| Admin | Person | Add new restaurants to the platform | Admin role |
| Notification provider | Outside system | Sends confirmations and reminders by email and SMS | Called by the system with an API key |
Each person-actor becomes a group of endpoints in step 4, and the access column becomes the auth rules. Each outside system becomes a box at the edge of the design in step 5.
4. API routing#
The API is the contract between the actors and the system. Group the endpoints by actor, use REST by default, and keep it to about five minutes. The full checklist lives in API Design.
| Actor | Endpoint | Routed to |
|---|---|---|
| Guest | GET /v1/restaurants?city=&date=&time=&party= |
Search service |
| Guest | GET /v1/restaurants/{id}/availability?date=&party= |
Search service |
| Guest | POST /v1/bookings (with an idempotency key) |
Booking service |
| Guest | DELETE /v1/bookings/{id} |
Booking service |
| Staff | PUT /v1/restaurants/{id}/tables |
Restaurant service |
| Staff | GET /v1/restaurants/{id}/bookings?date= |
Restaurant service |
| Admin | POST /v1/restaurants |
Restaurant service |
Then say how a request travels, in one sentence each:
- The client sends the request over HTTPS.
- An API gateway checks the token, applies rate limits and routes by path.
- The service that owns the resource handles it.
The idempotency key on POST /v1/bookings is worth a sentence: if a guest's phone retries a booking after a timeout, the second request returns the first booking instead of creating another one.
5. High-level design#
Now draw. Take the functional requirements one at a time, and add only the boxes each one needs. Walk the request through the boxes as you draw them. Ignore scale for now: the goal is a design that is simple and correct.
- Search. Guest app → gateway → search service → database. The database holds
restaurants,tablesandbookings. The search service finds restaurants in the city, then the tables with no booking in that slot. - Book. Gateway → booking service, which writes a row to
bookings. - Cancel. The booking service marks the booking as cancelled, which frees the slot.
- Staff. Staff app → gateway → restaurant service, which updates
tablesand opening hours, and reads the day's bookings.
At this point the design meets every functional requirement. It doesn't yet meet the non-functional ones, and that's on purpose. If you optimize before the basic flows work, you can end up with a fast system that does the wrong thing, and no time left to fix it.
6. Address the non-functional requirements#
This is where most of the interview time goes. Go back to the list from step 2 and take one quality at a time:
- Find where the basic design breaks it.
- Change the design to meet it.
- Say the trade-off the change brings.
Start with the quality the system can't live without. For reservations, that's no double-booking.
| Requirement | Where the basic design breaks | Change | Trade-off |
|---|---|---|---|
| No double-booking | Two guests see the last 8 pm table free and both book it | A unique constraint on (table_id, slot) for active bookings, checked inside the transaction. The second insert fails, and that guest sees the next free slot |
The losing guest gets an error and must pick again |
| Search under 300 ms at 23,000 per second | Computing availability from bookings on every search is too slow |
A search index for restaurants, and a cache of free slots per restaurant and date, updated when bookings change | Search can be a few seconds stale. The booking step still checks the database, so stale search never causes a double-booking |
| Search stays up | One database is a single point of failure | Read replicas in more than one availability zone | Replicas lag slightly behind the primary, which search can accept |
| Evening spikes | A rush on Friday evening overloads the services | Stateless services that autoscale, and per-user rate limits at the gateway | Autoscaling needs a minute to react, so keep some headroom |
| Reminders | Calling the email provider inside the booking request makes booking slow, and it fails when the provider is down | Booking events go on a queue, and workers send the messages with retries | Messages arrive a little later, and workers must not send the same reminder twice |
If time is short, you won't get through every row. Cover the most important one fully, then ask the interviewer which one they want next. They often have a specific area in mind, and following their lead is part of the interview.
Wrap-up#
Spend the last few minutes on a short recap: walk one booking through the final design, point at each functional requirement and the box that serves it, and point at each non-functional requirement and the change that meets it. Then name the next bottleneck. For reservations: "If we grow to many more cities, I'd shard bookings by restaurant, since every booking query already includes the restaurant."
Common mistakes#
Most failed interviews break the order of these steps rather than lacking knowledge. Watch for these:
| Mistake | Fix |
|---|---|
| Drawing boxes before agreeing on requirements | Write steps 1 and 2 on the board first, and confirm them |
| Ten functional requirements | Keep 3–5. List the rest as out of scope |
| "It should be fast and scalable" | Give each quality a number or a clear rule |
| Adding caches and queues in step 5 | Make it work first. Every addition in step 6 answers a named requirement |
| A change with no trade-off | Every change costs something. Say what |
| Silence while drawing | Narrate each box: what it does and which requirement it serves |
Practice problems#
Each of these runs the same six steps on a different system, with a whiteboard sketch at the end:
| Problem | What makes it interesting |
|---|---|
| URL Shortener | Unique codes and a read path 100 times busier than the write path |
| Distributed Rate Limiter | A fast shared counter checked on every request |
| Distributed Cache | LRU eviction, expiry and spreading keys across nodes |
| Top K Videos | Counting a huge stream of views over time windows |
| Local Business Search | Search by text and location, and one review per user |
| File Storage and Sync | Large files in chunks, kept in sync across devices |
| Chat App | Real-time delivery to online and offline users |
Key takeaways#
- Six steps: functional requirements, non-functional requirements, actors, API routing, high-level design, then address the non-functional requirements.
- Functional requirements are 3–5 "Users can…" lines plus an out-of-scope list.
- Non-functional requirements need numbers, and consistency is chosen per feature.
- Do back-of-envelope math only when the answer changes a decision.
- Actors decide how the API is grouped and who may call what.
- Build the high-level design one requirement at a time, simple and correct, with no optimizing.
- In step 6, take each quality, find where the design breaks it, change the design, and say the trade-off.