Last active
February 9, 2020 17:10
-
-
Save mvoitko/d14d8f4f88013be41179f326a11e763a to your computer and use it in GitHub Desktop.
System Design Flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1. Requirements clarifications: | |
1.1 Define use cases with interviewers help. | |
Who is going to use it? | |
How are they going to use it? | |
What does the system do? | |
What are the inputs and outputs of the system? | |
1.2 Ask about additional features. | |
1.3 Remove items that interviewer deems out of scope. | |
1.4 Assume high availability required. Add as a use case. | |
Step 2. Constraints: | |
2.1How many users are there? How many requests per month? | |
2.2 How many RPS (requests per second) either from interviewer or do the math? | |
2.3 How much data do we expect to handle? | |
2.4 Estimate Read vs Write ratio. Keep in mind 80/20 rule. | |
2.5 How much data is written per second? | |
2.6 Calculte Total storage required over 5 years. | |
2.7 How much data read per second? | |
Step 3. Create a high level design: | |
3.1 Sketch the main components and connections. | |
Justify the ideas. | |
Layers - Service -> Data -> Caching. | |
Step 4. Design core components. Rough overview of any key algo that drives the service. | |
Step 5. Scale the design | |
Identify and address bottlenecks, given the constraints. | |
For example, do you need the following to address scalability issues? | |
- Load balancer | |
- Horizontal scaling | |
- Caching | |
- Database sharding | |
!!! Everything is a trade-off !!! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment