Home / Case studies / Story

EMERGENCY · DEVOPS

The launch that melted the infrastructure

Down: Site down through a 12x traffic spike; every autoscaling event OOM-killed on boot
Resolved: Serving traffic the same day, stable at the new load, with load tests to 20x

Illustrative composite of real production work, anonymized and simplified. Mapped to DevOps and infrastructure.

12x Traffic spike in one hour
80% Read traffic on two endpoints
Same day Back to serving, stable
20x Load tested after the fix

The situation

A SaaS company got the break they had chased for a year: a feature in a publication their entire market reads. Traffic climbed twelvefold inside an hour. This was supposed to be the best day in the company history.

Instead the site went down and stayed down. The autoscaler was configured and did try to help, spinning up new instances to meet demand. But every new instance died within minutes of starting, so the fleet never grew. From the outside it looked like the infrastructure had simply melted under load. From the inside, it was worse than that: the system was actively fighting its own recovery.

What we found

Two failures were compounding, and neither was raw capacity.

The first was a boot-time dependency. On startup, each new instance fetched its configuration from an internal service. Under normal load that service answered instantly. Under the spike it was itself overwhelmed, so new instances hung waiting for config, tripped their startup health check, and were OOM-killed before they ever served a request. The autoscaler dutifully replaced them, and the replacements hit the same wall. That is a crash loop: the recovery mechanism feeding the outage.

The second was the database connection pool. It had been sized for the old, smaller fleet. The few instances that did manage to stay alive competed for a pool far too small for the traffic, so they starved each other of connections and slowed to a crawl. Even a healthy instance could not do useful work.

Underneath both, two read endpoints were taking roughly eighty percent of all read traffic and hitting the database directly on every request, with nothing in front of them.

The fix

The priority was to break the crash loop, because until new instances could survive boot, nothing else could help.

The boot-time config fetch was removed from the critical path by baking configuration into the machine image. Instances now start with everything they need and depend on no other service to come up. That single change turned the crash loop into a fleet that actually grew when the autoscaler asked it to.

With instances staying alive, the database connection pool was right-sized for the new fleet so instances stopped starving one another. Then a cache was placed in front of the two endpoints carrying eighty percent of read traffic, which took enormous pressure off the database at a stroke.

Finally, rather than let the autoscaler slam the whole fleet up at once against a cold cache and a recovering database, capacity was brought back in controlled waves, warming the cache and letting the database settle between steps.

The outcome

The site was serving traffic again the same day and held steady at the new twelvefold load, on what turned out to be the biggest day in the company history after all.

The more durable result was that the near-miss became real capacity. Because the boot path no longer depended on anything at runtime and the hot endpoints were cached, the system was verified to hold at twenty times the old baseline. The next spike stopped being a threat and became a number they had already tested past.

What we changed so it can't recur
  • Load test at a multiple of your best-ever day, not your average, so a spike this size is a rehearsed event rather than a discovery.
  • Remove runtime dependencies from the boot path; an instance should be able to start with no other service healthy, so recovery never crash-loops.
  • Size connection pools and other shared limits for the fleet you can scale to, not the fleet you run today.
  • Cache the handful of endpoints that carry most of your read traffic, and alert on connection-pool saturation before it starves the fleet.

The lesson

When a site will not recover under load, suspect the recovery path itself. An autoscaler that boots instances into a crash loop makes the outage worse, not better; the boot path has to be able to succeed with nothing else healthy.

The shape of the work
Hour 0

Triage: identify the crash loop, stop the thrashing autoscaler

Hour 1

Boot-time config dependency broken, instances stay up

Hours 1 to 4

Connection pool right-sized, cache placed on the hot endpoints

Same day

Fleet brought up in controlled waves, stable at 12x

Recognize your situation?

Whether it's mid-incident or a slow-building worry, the first step is the same: describe it, and a senior engineer will tell you what's likely wrong.

Book a fix