Skip to content

The site falls over at peak

Aspect Aspect
Typical organization A retailer on sale days, a ticketing site, a tax or benefits portal near its deadline, or any product launch
Symptoms Slow pages, then errors, at exactly the moment demand is highest
Root cause Capacity sized for normal days, untested limits, and every request doing expensive work synchronously
Usual fix Load test to find the limits, serve what you can from cache, queue what can wait, and protect the core with admission control
Patterns Caching and CDN, queue-based load leveling, autoscaling, circuit breakers, a waiting room
  • The biggest outage of the year happened on the biggest sales day of the year.
  • Autoscaling added servers, but the database fell over anyway.
  • One slow downstream service made every page slow.
  • Nobody knows how many users the system can actually handle.
  • Load tests, if any, ran against an environment much smaller than production.

Systems are usually sized for an average day and tested, if at all, at a fraction of real peak. Under load, the weakest shared component, often the database, a payment provider or a session store, saturates first. Then retries and timeouts pile up, and the whole system slows together. Adding web servers rarely helps when the bottleneck is behind them.

Option Helps with Watch out for
Load testing at expected peak and beyond Finding the real bottleneck before customers do Needs production-like data and environment
CDN and caching Pages and data that many users read Stale data; cache invalidation
Queue-based load leveling Work that doesn’t need to finish during the request, such as confirmation emails and order processing The user needs a clear “we’re processing it” state
Autoscaling Stateless tiers Doesn’t fix the database or third parties; scaling takes minutes
Admission control and a waiting room Demand far above capacity Users wait, but the site stays up
Graceful degradation Non-essential features under pressure Needs feature flags and clear priorities
  1. Agree the peak. Use history and business forecasts to set a target, such as three times last year’s busiest hour.
  2. Load test until something breaks, and fix the first bottleneck, then test again. Repeat until you exceed the target with margin.
  3. Serve reads from the edge: static content and cacheable pages from a CDN, hot data from a cache.
  4. Move non-urgent work to queues, so the request path does only what the user must wait for.
  5. Protect the core: rate limits, circuit breakers on slow dependencies, and a waiting room for when demand still exceeds capacity.
  6. Rehearse the day, with dashboards, an incident plan and a list of features to switch off first.
Absorbing a traffic spike1. Static content and cacheable pages are served by the CDN. 2. Requests that need the application pass through a waiting room. 3. The waiting room admits only as many users as the system can handle. 4. Hot data is read from a cache instead of the database. 5. Work that can wait, such as emails and fulfillment, goes onto a queue. 6. Workers drain the queue at a steady pace the database can sustain. Usersmany times normal load CDNstatic and cached pages Waiting roomadmits what fitsCachehot data App serversautoscaled, stateless Queuework that can wait Databaseprotected from spikes Workerssteady pace123456
Absorbing a traffic spike Most reads never reach the application; slow work goes to a queue; the waiting room protects everything behind it.
  1. Static content and cacheable pages are served by the CDN.
  2. Requests that need the application pass through a waiting room.
  3. The waiting room admits only as many users as the system can handle.
  4. Hot data is read from a cache instead of the database.
  5. Work that can wait, such as emails and fulfillment, goes onto a queue.
  6. Workers drain the queue at a steady pace the database can sustain.
  • Caches serve stale data. Decide per page how stale is acceptable.
  • Queues delay work. Users need to see that an order is accepted even if it isn’t processed yet.
  • Waiting rooms frustrate people, but much less than errors and lost orders.

The next peak passes with error rates and response times close to a normal day, and the load test results match what you saw in production.

  • HealthCare.gov launched without verifying that it met its performance requirements.
  • Prime Video found its first design reached only about 5% of the expected load when measured.
  • The failure library has several outages triggered by load.

Written and edited by Abhinav Taduka, enterprise software architect.