advanced
Scalability
Patterns that keep services responsive as traffic grows, including horizontal scaling, balancing, queues, limits, and backpressure.
Scalability interviews ask how systems stay responsive as traffic grows. Topics include adding instances safely, balancing load, decoupling with queues, protecting with rate limits, and applying backpressure when consumers cannot keep up.
Subtopics: horizontal scaling, load balancing, queues, rate limiting, backpressure.
On interviews: design for a 10× traffic spike on a stateless API; when sticky sessions hurt; how idempotent queue consumers prevent duplicate charges; shedding load vs retry storms.
Common pitfalls: scaling before fixing synchronous bottlenecks; unbounded queues hiding overload; rate limits only at the edge while internal services collapse.
The trade-off is elasticity and fault isolation versus operational complexity and cost.
Checklist:
- Prefer stateless app tiers where possible.
- Use queues for slow or spiky work.
- Limit and shed load at boundaries.
- Test overload behavior, not only happy path.