Overall
- 理清需求(功能性需求和非功能性需求)
- 约束条件,如QPS、用户量、存储量,Page View,Daily Active User
- High-level Design
- 描述系统中的一些组件和组件之间的交互关系
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
- A little background on the changes
- Objectives
- Provide the objective of the services to support the feature/changes
- Requirements
- Functional Requirements
- Non-Functional Requirements
- Background
-
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
- Put the investigation result here
-
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/
- Consistency
- Replication - https://swsmile.info/post/architecture-replication/
- 全同步
- 半同步
- 异步同步
- Load balance - https://swsmile.info/post/distributed-system-load-balancing/
- Scalability - https://swsmile.info/post/architecture-scalability/
- 水平扩展 horizontal scalability
- 纵向扩展 vertical scalability
- Data model - https://swsmile.info/post/Architecture-data-modeling/
- Storage (logical data model)
- RDBMS
- MySQL, Oracle database, PostgreSQL
- No-SQL
- e.g., CouchDB, Neo4j, Cassandra, HBase, Amazon DynamoDB
- key-values
- 文档类型存储
- 列式存储
- HBase
- 图数据库
- RDBMS
- Storage (logical data model)
- Cache - https://swsmile.info/tags/cachesystem/
- Cache consistency
- Others
- Monitoring
- Alerts
- Logging
- Tracing
- Error cases (server failure, network loss, etc.)
- Downgrade plan
- Rate limit
- 熔断(Circuit Breaker)
- 降级(Downgrade)
Reference
- Designing Data-Intensive Applications
- System Design Interview – An insider’s guide