The whole course ▾
System Design · Lesson 4 of 39 · Week 1
The 45-minute system design interview
Designing a system in 45 minutes is terrifying. Today: the framework to turn that panic into a structured, senior-level answer using QuickBite's checkout.
Got a doubt? Ask in the comments under the video.Subscribe
QuickBite's checkout, walked through the framework.
QuickBite is the food delivery app we grow through the course, from one server to millions of orders.
The 45-minute trap
In the last three lessons, we looked at how requests flow, the numbers that matter, and how to design a contract with APIs. Today, we put it all together into a framework.
Imagine you're in the room. The interviewer says: 'Design the checkout system for QuickBite.' Your heart starts racing. You want to show off everything you know about Kafka, Redis, and S3. So, you start drawing boxes immediately. This is the fastest way to fail. Why? Because you haven't asked what the system actually needs to do yet. You're building a solution for a problem you don't understand. Interviewers call this 'box-pushing,' and it's the number one mistake candidates make. At a mid-level, they might guide you back. At a senior or staff level, the interview is basically over. You've shown that you value tools more than the business problem. We need a map to stay on track, and that map has five specific steps.
Step 1: Requirements
The first five minutes are the most important. You need to define the boundaries of the sandbox you're playing in.
First, the functional requirements. What does the user actually do? For QuickBite's checkout, it's simple: viewing the cart, placing the order, and getting a confirmation. Don't assume. Ask! Should we handle coupons? Should we handle scheduled deliveries? If you don't ask, you might spend twenty minutes on a feature the interviewer doesn't care about.
Next, the non-functional requirements. This is where you use the numbers from Lesson 2. If QuickBite has ten million daily users, and we hit a peak of five thousand orders per second, our design changes completely. We also need to talk about trade-offs. Do we value availability—the app is always up—or consistency—we never, ever double-charge a customer? For checkout, consistency is king. You can't just say 'it should be fast.' You need to say 'it should handle five thousand requests a second with sub-second latency.' If you don't use numbers, you're just guessing.
Step 2: API and Data Model
Now we define the contract. This is the 'what' before the 'how'.
Before drawing a single server, write down the API. As we saw in Lesson 3, the API is the contract. For QuickBite, a `POST` to `/v1/orders` is the core. It needs a user ID, a list of items, and a payment method. By writing this out, you're showing the interviewer that you understand the data flow. It also helps you identify core entities.
These are your core entities: the User, the Order, and the Payment. In a real interview, you'd quickly sketch the database schema. Is it a relational database like Postgres, or a NoSQL store? For checkout, where transactions and consistency matter, a relational database is usually the right starting point. You're building the foundation, brick by brick, before you try to scale it.
Step 3: High-Level Design
Ten minutes in, and now—and only now—do we draw the boxes.
This is your High-Level Design. Keep it simple. The Customer hits the Load Balancer. The request goes to the Order Service. That service talks to an external payment gateway, and then saves the result in the Orders DB. Notice I haven't added a cache, or a message queue, or a CDN yet. This is the 'happy path.' It proves you can build a system that works for one person. The interviewer is checking if you can connect the dots logically. If you jump to a complex microservices mesh now, you'll get lost in the details before you've even solved the main problem.
Step 4: Deep Dives
This is where the interview actually happens. This is where you show your seniority.
Now the interviewer will poke holes. 'What if the payment gateway fails?' or 'What if two people try to buy the last burger at the same time?' This is the Deep Dive. For a mid-level role, they want to see you handle one failure. For a senior or staff role, they want to see you navigate trade-offs. If the payment gateway is slow, do we wait? Or do we make it asynchronous using a queue? We'll cover queues in Lesson 15, but for now, you just need to show you recognize the bottleneck.
Compare your options out loud. A synchronous call is simple but risky. An asynchronous flow is resilient but complex. There is no 'right' answer, only trade-offs. A senior engineer doesn't say 'we should use Kafka.' They say 'Since our payment gateway has high latency, I'd suggest an asynchronous approach to keep our checkout fast, even though it adds complexity to our error handling.' That sentence alone is worth more than ten boxes on the board.
In the interview
How do you actually get scored?
At the Mid level, they check if you know the components. Can you use a load balancer? Do you know what a database is for? At the Senior level, they check your reasoning. Do you understand why you chose Postgres over MongoDB? At the Staff level, they check if you care about the cost and the business. Are you over-engineering a simple problem? Your goal is to move up that ladder by being intentional with every choice.
So, start the interview with this line: 'I'll start by clarifying requirements and estimating scale so we don't over-engineer the solution.' It sets the tone immediately. It tells the interviewer you are a professional who builds for a purpose, not just for fun.
You've finished the high-level design. What is the very next thing you should do?
Show the answer
Ask the interviewer which part of the system they want to deep-dive into.
Three things to remember. Requirements always come before boxes. Define your API before you design the internals. And always, always prioritize trade-offs over specific tools. If you follow this framework, you'll never run out of time or things to say.
Lessons on weekdays, the week's revision on Saturday, a mock interview on Sunday.