System Design Flow
-
Clarification of Requirement
- Functional Requirement
- such as based on the conversation, let's focus on 3 key features...
- Non-Functional Requirement
- High Availiblity and Scalability(Such as can handle spike in traffic during peak hours in densely populated areas)
- user amount
- qps
- Data Privacy
- High Consistency
- Low Latency (such as able to search quickly,
<
1s) - Fault Tolerance
- High Availiblity and Scalability(Such as can handle spike in traffic during peak hours in densely populated areas)
- Functional Requirement
-
High Level
- API design
- RESTFul API
- Data model
- read/write ratio
- table design
- High Level Design
- load balancer(talk about it's functionality: distribute...)
- biz service(talk about scalability, read/write, qps)
- chat service
- database cluster(read/write separate, master/slave cluster, replication, small data inconsistency at limited time)
- Algorithm
- API design
-
deep dive
-
table sharding
-
cache for low latency(cache key, consistency, persistency, expiration and eviction)
-
storage estimation
-
QPS estimation
-
system throughput estimation
-
-
wrap up
- key point