Skip to main content

System Design Flow

  1. Clarification of Requirement

    1. Functional Requirement
      1. such as based on the conversation, let's focus on 3 key features...
    2. Non-Functional Requirement
      1. High Availiblity and Scalability(Such as can handle spike in traffic during peak hours in densely populated areas)
        1. user amount
        2. qps
      2. Data Privacy
      3. High Consistency
      4. Low Latency (such as able to search quickly, <1s)
      5. Fault Tolerance
  2. High Level

    1. API design
      • RESTFul API
    2. Data model
      • read/write ratio
      • table design
    3. 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)
    4. Algorithm
  3. deep dive

    • table sharding

    • cache for low latency(cache key, consistency, persistency, expiration and eviction)

    • storage estimation

    • QPS estimation

    • system throughput estimation

  4. wrap up

    1. key point