No history yet

Interview Strategy

The Four-Step Method

A system design interview isn't a test of memorization. It's a collaborative problem-solving session. The interviewer gives you a vague prompt, like "Design a Twitter feed," and watches how you navigate the ambiguity. Your goal isn't to produce a single perfect answer, but to demonstrate a structured thought process. We can break this process down into four distinct steps.

Lesson image

This framework helps you manage the 45-60 minute interview, ensuring you cover all critical aspects of the design. The steps are:

  1. Scope the Problem: Clarify requirements and constraints.
  2. High-Level Design: Sketch the main components and data flow.
  3. Deep Dive: Zoom in on specific components to discuss trade-offs.
  4. Wrap Up: Identify bottlenecks and suggest future improvements.

Interviewers want to see how you think. The final diagram is less important than the path you took to create it.

Step 1: Scope the Problem

Never start designing immediately. The initial prompt is intentionally vague to test your ability to gather information. Your first task is to ask clarifying questions and establish the system's boundaries. You'll define two types of requirements: functional and non-functional.

Requirement TypeDescriptionExample (for a Twitter-like service)
FunctionalWhat the system does. These are user-facing features.Users can post tweets (up to 280 characters). Users can view their home timeline.
Non-FunctionalHow the system operates. These define quality attributes like speed and reliability.The home timeline must load in under 200ms. The system must have 99.99% availability.

Once requirements are clear, you must estimate the scale. This is where come in. These rough estimates guide your architectural choices. For example, if you're designing a service with 100 million daily active users (DAU), a single database server won't be enough. Your math proves it.

Let's estimate the write throughput for our Twitter-like service. Assume we have 300 million DAU, and 10% of them post one tweet per day.

Tweets per day=300M×0.1=30M\text{Tweets per day} = 300M \times 0.1 = 30M
Writes per second (QPS)=30M24 hr×3600 s/hr350 QPS\text{Writes per second (QPS)} = \frac{30M}{24 \text{ hr} \times 3600 \text{ s/hr}} \approx 350 \text{ QPS}

This calculation is a simplified average. A real-world system experiences peaks. You might mention that peak traffic could be 2-3x the average, so you should design for around 1,000 QPS. This shows the interviewer you're thinking about real-world conditions.

Step 2 & 3: High-Level Design and Deep Dives

With requirements and scale defined, you can sketch the high-level design. Start with a simple diagram showing the main services and how they connect. Use boxes for services (e.g., Web Server, Application Server, Database) and arrows to show the flow of requests.

As you draw, explain your choices. Why a load balancer? "To distribute traffic across our web servers and prevent any single server from being overwhelmed." Why a cache? "To store frequently accessed data, like timeline information, in memory for faster retrieval, reducing the load on our main database."

After sketching the (HLD), the interviewer will guide you toward a deep dive. They might ask, "How would you scale the database?" or "How does the timeline generation service work?" This is your cue to zoom in on one part of the diagram.

Let's say they ask about scaling the database. You could discuss the trade-offs between vertical and horizontal scaling. For a system with high write traffic, you'd likely propose horizontal scaling via , explaining how you might partition the data (e.g., by UserID). You don't need to write code, but you must be able to articulate the logic and trade-offs of your chosen approach.

Step 4: Wrap Up

In the final 5-10 minutes, you should zoom back out and summarize your design. This is your chance to identify potential bottlenecks and suggest future improvements. A strong finish shows you can think critically about your own work.

For example, you could point out that the timeline generation service could become a bottleneck if a user has millions of followers (the "celebrity problem"). You could then propose solutions, like pre-computing timelines or using a hybrid push/pull model for notifications.

Finally, briefly recap the non-functional requirements you met. "This design is highly available because we have redundant servers behind a load balancer, and it's scalable because we've sharded our database." This ties your entire discussion together, leaving the interviewer with a clear picture of your comprehensive approach.

Now, let's see how well you've absorbed these steps.

Quiz Questions 1/6

What is the correct order of the four steps in the system design interview framework?

Quiz Questions 2/6

When an interviewer gives you a vague prompt like "Design a URL shortener," what should be your immediate first action?

Mastering this four-step framework turns a daunting interview into a manageable conversation. It provides the structure you need to confidently tackle any open-ended system design problem.