InterviewStack.io LogoInterviewStack.io

Scalability Patterns and Techniques Questions

Scaling a system to handle growth in traffic and data: horizontal versus vertical scaling, statelessness, sharding and partitioning strategies, read replicas, and connection pooling. Covers capacity estimation, identifying bottlenecks, and the tradeoffs each scaling axis introduces. The general toolkit for taking a design from thousands to millions of users.

MediumSystem Design
31 practiced

A producer spike is causing your downstream consumers to fall behind. Design a strategy to handle the backpressure and prevent data loss: queue sizing, partitioning, autoscaling the consumers, rate-limiting the producers, and a retry/dead-letter-queue design, plus monitoring to detect consumer lag. How would you implement backpressure propagation back to the producers?

HardTechnical
26 practiced

A hot cache entry is about to expire, or a backend service is recovering from an outage, and you expect a flood of simultaneous requests to hit the same key or the same origin at once. Design a comprehensive strategy to prevent this 'thundering herd' across a globally distributed cache and service fleet, covering both techniques that stop the herd from forming in the first place and techniques that contain it once it starts. What would you monitor and alert on to confirm the mitigation is working, and what trade-off would you make between complexity and protection?

EasyTechnical
34 practiced

Describe the cache-aside, read-through, write-through, and write-behind cache topologies, and when you'd reach for each. For every topology, explain the read/write flow and the latency and consistency trade-offs, and give a concrete example use case such as session storage, a product catalog, or a leaderboard.

HardTechnical
51 practiced

A web endpoint must meet a 200ms P95 latency SLO and expects 5,000 concurrent requests, with an average processing time of 50ms per request per CPU core. Estimate how many CPU cores or instances you'd need. State your assumptions about target CPU utilization and headroom, show your calculations using Little's Law, and explain what overheads you'd account for.

MediumTechnical
51 practiced

You have 20 application servers, each rated at 1,000 RPS capacity. Observed P95 load across the fleet is 12,000 RPS. Calculate the current headroom percentage, and compute how many additional instances you'd need to reach a target of 40% headroom. Show your steps and assumptions.

Unlock Full Question Bank

Get access to all Scalability Patterns and Techniques interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.