【Architecture】System Design

Posted by 西维蜀黍 on 2023-07-31, Last Modified on 2023-09-28

Overall

  1. 理清需求(功能性需求和非功能性需求)
    1. 约束条件,如QPS、用户量、存储量,Page View,Daily Active User
  2. High-level Design
    1. 描述系统中的一些组件和组件之间的交互关系

High-level Design

Template - System Design Details

  • Acknowledgement

    • By other teams
  • Changelog

  • Deployment Sequence

    • Same deployment sequence means they can be deployed together (no strong requirement on the sequence)
  • Introductions

    • Background
      • A little background on the changes
        • why the feature is necessary
        • why do we take this approaches
        • Terminologies
    • Objectives
      • Provide the objective of the services to support the feature/changes
    • Requirements
      • Functional Requirements
      • Non-Functional Requirements
  • Flows and Logics

  • APIs

    • logic changes
    • highlight the new fields that are added
    • how to use the API
    • potential errors
  • Databases

    • ER Diagram
  • Dependencies

    • API level dependency multiplier
  • Performance

    • QPS analysis and potential bottlenecks. Might not need very accurate numbers here but can have some kind of estimations or justifications why this is not a concern.
    • Can also include performance issues that might not show up now but might be an issue in the future
  • Backward Compatibility

    • Feature Toggle
    • Clean up code
  • Monitoring

  • Downgrade/Rollback Plan

    • E.g., Rate limit, circuit breaker
  • System Limitation

  • Implementation Details

  • Investigations

    • Put the investigation result here
      • Alternatives that were considered but were not chosen due to xxx
      • Supporting data
  • Clean-up Plan

    • If this feature/project, needs any cleanup phase after the release, add the details here. (It can also be in a separate document and add a link to the document here)

      Details including, but are not limited to,

      • Code Clean up details
      • DB Clean up details
      • Config Clean up details
  • Financial Risk

  • Result Analysis

  • Task breakdown

Consideration

Refer to https://swsmile.info/post/high-concurrency/

Reference

  • Designing Data-Intensive Applications
  • System Design Interview – An insider’s guide