Step by Step
A/C: 看Doc 理解各個步驟的真正含義,summarize & 簡短總結成關鍵詞 so that可以在每個system里面套用
ETA 8號
TinyURL
A/C: TBD
ETA 10號
Pastebin
A/C: TBD
ETA 12號
System Design Interviews: A step by step guide
Step 1: Requirements clarifications
搞清楚:
包含哪些功能
包不包括video or photos
only focus on the back-end or both back-end and front-end?
Step 2: System interface definition
目的:
establish the exact contract expected from the system
確保requirements 理解正確
Step 3: Back-of-the-envelope estimation(粗略估計)
問問題 --> estimate ==> will help (later) scaling, LB and caching.
問題example:
- scale (如多少tweets posted, 多少tweets viewed, 多少timeline generation等)
- 多大storage
- network bandwidth --> decide how to manage traffic and balance load among servers
Step 4: Defining data model
identify various entities of the system
--> NoSQL or SQL
What kind of block storage should we use to store photos and videos?
Step 5: High-level design
畫block diagram with 5~6 boxes 來表示system的components
Twitter example:

并且要:根據(jù)A需求,我們要用B來handle。
例子:根據(jù)有大量read tweets,我們要用separate servers來handle。
Step 6: Detailed design
選一兩個dig deeper。根據(jù)interviewer 的feedback 詳細解釋哪一部分。
應該always提供不同的approches,并且比較他們的pros and cons,并說為什么最后選擇這種??紤]tradeoff。
可能涉及:
- database partition
- handle hot user
- optimize (LB, cache, etc.)
Step 7: Identifying and resolving bottlenecks
討論bottlenect,越多越好,并提供不同approches to mitigate them
- single point failure(single point failure impacts the whole system) (failover?)
- replica?
- monitoring & alerts for performance?