Skip to content

Instantly share code, notes, and snippets.

@hughdbrown
Created June 16, 2020 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hughdbrown/f47ba1784303d964dbed51e0cdf0e2f4 to your computer and use it in GitHub Desktop.
Save hughdbrown/f47ba1784303d964dbed51e0cdf0e2f4 to your computer and use it in GitHub Desktop.
System design interview notes
System design interview framework
Sam Gavis-Hughson
1. Understand the details of the system
2. Simple high-level architecture
3. Optimize
4. ....
1. What is your interviewer asking?
2. What are their expectations?
3. How to guide the interview to your area of expertise?
Pyschic method
1. Try to relate the system to a system you are already familiar with
2. Establish specific use-cases that inform the behavior of the system
how are users (general or specific group); how much data transferred;
3. Ask broad questions that allow you to quickly narrow down the requirements/eliminate many possibilities
Design a news feed
1. Is it similar to an existing system?
Facebook, twitter, instagram, RSS aggregator
(Can you reply? is it sharable? is it the same for all people?)
2. Establish a specific use-case
What is a use-case for the app?
3. Ask broad questions
Who will be using the app?
What sort of data will be displayed?
Is the data organizaed in a specific way?
What are the interviewer's expectations?
- There are as many expectations as there are interviewers.
- These problems don't have one "right" answer.
Approach the interview iteratively.
Minimum viable system
- the simplest system that solves the core use cases
Key questions to ask
1. Which features are absolutely required?
If I remove feature X, does it no longer accomplish the stated objective?
2. Which features could be trivially implemented on top of the system?
Design a Facebook news feed
Possible features
- allow users to create posts
- display multimedia posts
- rank posts based on preset criteria
- allow people to react to posts
- autoload new posts/notify us when there are new posts
- commenting on and sharing posts
- control who is able
Guiding the interview to your area of expertise
You cannot force the interview
... but you can guide it in your preferred direction.
Pyramid of system design
- interface layer (APIs)
- data layer (processing, operation, data manipulation)
- storage layer (caches, databases)
"I could go deeper on X, Y, or Z. I think that [area of expertise] would be a good place to start. Does that work for you?"
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment