Scaling Fundamentals
Difficulty: Easy | Topic #8
What to Learn
Vertical scaling (bigger machines) vs horizontal scaling (more machines), stateless service design (session externalization), auto-scaling triggers, back-of-the-envelope estimation (QPS, storage, bandwidth).
Resources
- Hello Interview: How to Prepare ↗
- ByteByteGo: Vertical Vs Horizontal Scaling ↗
- System Design: Back-Of-The-Envelope Estimation ↗
Covered by Problems
| Problem | Difficulty | Link |
|---|---|---|
| Local Delivery Service | Easy | → |
| Video Streaming (YouTube) | Medium | → |
| Ad Click Aggregator | Hard | → |
| Metrics Monitoring System | Hard | → |
Key Concepts to Master
- Stateless vs stateful services and how statefulness prevents horizontal scaling
- Session storage externalization (Redis, sticky sessions tradeoff)
- Back-of-the-envelope: QPS estimation, storage sizing, bandwidth calculation
- Auto-scaling triggers (CPU%, queue depth, custom metrics)
- Database vertical limits and why sharding becomes necessary