System Design Interview is unstructured in which people are asked to answer open-ended design questions.
What could be a good strategy to answer a system design question? Follow these seven steps:
➡ Step 1: Requirements clarifications
1) Make sure you know the exact scope of the system by asking questions.
2) Start the interview by asking a few questions.
3) Not all things can be clarified at the beginning; keep asking clarifying questions throughout the interview.
➡ Step 2: Back-of-the-envelope Estimation
1) Establish a reasonable estimate of the size of the system you wish to design.
2) Try estimating the resources (storage, CPU, memory, network, etc.) required to build the system.
3) Later, this will help when you focus on scaling, partitioning, load balancing, caching, etc.
➡ Step 3: System Interface Definition
1) Describe the interfaces of the system.
2) Define what APIs are expected from the system.
3) This will not only establish the exact contract expected from the system but also ensure that you have not gotten any requirements wrong.
➡ Step 4: Define Data Model
1) Define the data model, what tables the system will have and what fields each table will contain.
2) Defining the data model will also clarify how data will flow between different components.
3) Later, this will guide the partitioning and management of data.
➡ Step 5: High-level Design
1) Draw a block diagram with 5–6 boxes representing the core components of your system.
2) Identify enough components that are needed to solve the design problem from end to end.
➡ Step 6: Detailed Design
1) Dig deeper into 2–3 major components.
2) Interviewer’s feedback should always guide you towards which parts of the system you should explain further.
3) Describe various options, their pros and cons, and why you chose one over the other.
➡ Step 7: Identifying and Resolving Bottlenecks
1) Identify and discuss as many bottlenecks as possible.
2) A few examples of bottlenecks are the single point of failure, network transfer rate, I/O rate, CPU and memory limits, etc.
3) Describe different ways to mitigate the bottlenecks.
Top comments (0)