[推薦] System Design Blueprint
Source
https://medium.com/dev-genius/system-design-blueprint-the-ultimate-guide-e27b914bf8f1
Summary
- Principles
- Modularization: divide and conquer, reduce complexity
- Abstraction: hide complexity, showing only key features
- Layering: divide into layers, each layer has its own responsibility
- Scalability: scale horizontally(add resources) or vertically(add storage, memory, CPU, etc.)
- Performance: reduce latency, increase throughput
- Security
- Fault Tolerance and Resilience: avoid single point of failure, ensure system can recover from failure
- Key Components
- DNS
- Load Balancer
- API Gateway: for routes, authentication, rate limiting, security, logging, monitoring, caching responses
- CDN
- Message Queue
- Communication Protocol: HTTP, gRPC, WebSocket, etc.
- Cache
- Database
- Replication Techniques: Master-Slave, Master-Master, etc.
- Distrubuted Unique ID: uuid, snowflake, etc, ide.
- Uploading Files in chunks using Signed URLs
- Signed URLs: a URL that contains authentication information
- Uploading Files in chunks: “multipart” upload
- How they works: divide files into chunks > request signed URL for each chunk > upload > confirm successful > handle failed uploads
- Chat and Streaming Protocols
- RTMP
- WebRTC
- WebSocket
- SSE
- HTTP
- polling
- short
- long
- polling
- Webhook
- Stream API
- Common Components in System Design
- Payment service
- Analytic service: data collection, processing, visualization
- Notification: user’s informed of events about updates, alerts, important information, like email, SMS, push notification, FCM, SNS, APN, Twilio.
- Search
- Recommendation service
- Best Practices for System Design
- Requirement Gathering: Understanding the whole picture of system requirements before starting the design process
- Design Patterns
- Documentation: document the design process, architecture, assumptions, and decisions
- Iterative Design: feedback loop
- Testing and Validation
發佈時間
2023-6-20