How to ace the system design interview

How to ace the system design interview

If you are planning to interview for a technical product manager or product manager role, then expect at least one round of an interview with a system design question.  

The system design interview involves designing an open-ended question on designing a large scale system. The interviewee will be judged on a couple of different viewpoints. The ability to ask questions in narrowing down the problem, the assumptions made, and the design of the large scale design are critical skills needed to ace the system design interview.

I have listed detailed steps to tackle the system design interview below. Use the steps and work through interview questions to strengthen your system design knowledge.

High Level Steps:

  1. Scope the problem and clarify the requirements
  2. Do estimations 
  3. High-Level Design
  4. Design core components
    1. Define API
  5. Detailed design (Depends on the time allocated for the interview)
  6. Resolve any bottlenecks in the design
  7. Summarize the solution

Detailed Walkthrough of System Design Approach:

Step 1: Scope the problem and clarify the requirements

System design interview questions are very open-ended. For example, the interviewer might ask a question such as, “Design Twitter Search” or “Design PasteBin”. When such open-ended questions, the onus falls on you to ask clarifying questions. Questions should be targeted to find the exact scope of the problem and narrow down the constraints. 

Asking the right questions, scope resolution and estimations are critical skills to develop for a good product manager. These skills are also useful to design systems for interview questions and impress your interviewer in the given 45 to 60 mins slot. Remember not to jump into the solution space with such open-ended questions. Start by asking the interviewer clarification questions such as 

  • Who is going to use the product 
  • What is the input and output of the system 
  • Does the system include push notifications
  • Estimation questions such as expected read-write ratios, and request per second
  • What is the amount of data the system needs to handle etc

Step 2: Estimations

Once you have scoped the problem, the next step is to do some back of the envelope calculations. Using the back of the envelope calculation is a subtle art that will take you a long way towards a successful design interview. Imagine estimation as a thought experiment where you perform quick calculations without concrete data to support your system design. In fact, Jeff Dean, Google, thinks that it is an important skill for every software engineer to be able to estimate performance after systems. 

Back of the envelope estimates could include storage estimates, bandwidth, memory estimates, the ratio of reading to write, and the amount of traffic that is expected.

Step 3: High Level Design

The next step is to create a high-level design with all the core components. Use the whiteboard to draw the core components and then show the connections between these components. Walkthrough your design using the flowchart on the whiteboard and explain your thought process to justify your ideas to the interviewer. 

Step 4: Design core components

Core components include the data model and how the data will flow between the different components in your system. Core components also include the database design/ schema. For example, you should define the tables of the database and justify your preference for SQL or no SQL options. 

The other core component is designing APIs for the system. API definitions are critical for exposing the functionality of your design

Step 5: Detailed design

Detail design is totally dependent on the interview time. If your interview slot is for an hour and you start this question at the beginning, then you should definitely jump into detail design. In the detailed design process, you will deep dive into the components that you designed at the high-level design and expand on each concept. 

If you want to impress the interviewer then discuss the scalability of your design. Introduce concepts such as data sharding, horizontal scaling, and load balancing to scale your design. Talking about these concepts will show the interviewer that you are thinking about the big picture and addressing issues that happen in large scale systems. 

Other topics to hit include caching, data purging and adding redundancy to your design.

Step 6: Resolve bottlenecks

Address bottlenecks in your design and steps that you would take to solve them. Security is another critical topic and this is a good time to talk about securing your system and development steps involved. 

Step 7: Summary

Finally, summarize your entire design by going through the scope again. Then provide a very high-level overview of all the steps that you took to arrive at the final solution. Finally, ask the interviewer if you need to address any other topic. Usually, you would have hit the time limit of the interview by now. If you have followed the steps above then you should get positive feedback from the interviewer.

In the next blog, we will apply the above guidelines and solutions to solve a few real-life interview questions.

0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments