系统设计从根本上说是关于权衡取舍——你不能同时优化所有方面,因此好的设计涉及理解权衡并根据具体需求和优先级做出深思熟虑的选择。合理地进行权衡取舍是系统设计的本质。
没有完美的设计
Every design decision involves TRADE-OFFS → improving one thing often costs another:
→ you CAN'T maximize consistency, availability, performance, cost, simplicity all at once
→ "it depends" → the right choice depends on the specific REQUIREMENTS and priorities
→ system design = making informed trade-offs, NOT finding a universal "best" design.
常见的权衡取舍
CONSISTENCY ↔ AVAILABILITY (CAP) → strong consistency vs high availability
LATENCY ↔ CONSISTENCY → caching/replication (fast but possibly stale) vs always-current
PERFORMANCE ↔ COST → more resources/caching cost money
SIMPLICITY ↔ SCALABILITY/flexibility → monolith (simple) vs microservices (scalable, complex)
READ ↔ WRITE optimization → denormalization (fast reads, harder writes) vs normalized
SPACE ↔ TIME → precompute/cache (more storage, less compute) vs compute on demand
→ understanding these lets you choose deliberately.
