System Design Flashcards
List the 7 Steps for System Design Interviews
Step 1: Requirements clarifications Step 2: System interface definition Step 3: Back-of-the-envelope estimation: Step 4: Define data model: Step 5: High-level design: Step 6: Detailed component design: Step 7: Bottlenecks:
Requirements clarifications
As the first step in your interview, you should ask questions to find the exact scope of the problem.
System interface definition
Define what APIs are expected from the system. This would not only establish the exact contract expected from the system but would also ensure if you haven’t gotten any requirements wrong
Back-of-the-envelope estimation:
What scale is expected from the system (e.g., number of new tweets, number of tweet views, how many timeline generations per sec., etc.)
How much storage would we need? This will depend on whether users can upload photos and videos in their tweets?
What network bandwidth usage are we expecting? This would be crucial in deciding how would we manage traffic and balance load between servers.
Define data model:
identify various entities of the system, how they will interact with each other and different aspect of data management like storage, transfer, encryption, etc
Which database system should we use?
High-level design:
Draw a block diagram with 5–6 boxes representing core components of your system. You should identify enough components that are needed to solve the actual problem from end-to-end.
Detailed component design:
Dig deeper into 2–3 components; interviewers feedback should always guide you towards which parts of the system she wants you to explain further, tradeoffs
Bottlenecks:
Is there any single point of failure in our system? What are we doing to mitigate it?
Do we’ve enough replicas of the data so that if we lose a few servers, we can still serve our users?
Similarly, do we’ve enough copies of different services running, such that a few failures will not cause total system shutdown?
How are we monitoring the performance of our service? Do we get alerts whenever critical components fail or their performance degrades?