Skip to main content

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

Covered by Problems

ProblemDifficultyLink
Local Delivery ServiceEasy
Video Streaming (YouTube)Medium
Ad Click AggregatorHard
Metrics Monitoring SystemHard

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