Skip to content

Canva’s 2024 API Gateway Outage: When a Fixed Asset Release Became a Thundering Herd

Canva's incident report shows queued clients released at once, a gateway weakened by lock contention, and scaling that could not outrun the herd.

Timeline of a stalled asset fetch queueing many clients, a single completion releasing them at once toward an API gateway, and autoscaling replacing tasks that are overwhelmed again

On 12 November 2024, canva.com was unavailable for roughly 52 minutes, from about 9:08 UTC to about 10:00 UTC. Canva published a post-incident review on 20 December 2024, which it describes as its first public incident report. Every fact in this article comes from that report, Canva incident report: API Gateway outage. Where this article goes beyond the report, it says so and labels the statement as a testing suggestion.

The report is useful for load testing because the outage had no single cause. Three conditions lined up, and each one can be written down as a test condition.

What happened, in order

At about 8:47 UTC, Canva deployed a new version of its editor. Client devices began fetching new static assets through Cloudflare, Canva’s CDN provider. At the same time, the network path between two Cloudflare locations, Singapore and Ashburn, was degraded. The report attributes this to a stale rule in Cloudflare’s traffic management system that sent IPv6 traffic over public transit, with packet loss reaching about 66 percent at peak. The 90th percentile of time to first byte rose by over 1,700 percent, and one asset took 20 minutes to download.

The affected file was the JavaScript chunk for the editor’s object panel. Many users, especially in Asia, saw the panel stuck in a loading state. The report notes something that matters for any release test: Canva’s canary system normally aborts a deployment when errors rise. Here, requests were not failing. They were not completing, so no errors were recorded and the canary did not trigger.

Cloudflare’s streaming acceleration merged requests for the same asset into one origin fetch. More than 270,000 user requests queued behind that single fetch, mostly from Southeast Asia.

At about 9:07 UTC the fetch completed, and every pending request finished at once. Devices then loaded the object panel at the same moment. The report puts the resulting load on Canva’s API Gateway at about 1.5 million requests per second, roughly three times its typical peak.

What the gateway did under that load

The gateway’s tasks could not process requests fast enough, and backlogs grew. Load balancers opened new connections to tasks that were already overloaded, which added memory pressure. Off-heap memory growth led the Linux out-of-memory killer to terminate all running containers within the first two minutes. The report describes a cascading failure across all tasks that outpaced autoscaling, and all canva.com requests failed.

Two further details turn this from a capacity story into a layered one.

A recent change to a telemetry library caused certain metrics to be re-registered every time a value was recorded. That work ran under a lock inside a third-party library. The gateway runs on Netty’s event loop model, where event loop threads must not block. Under heavy load, lock contention sharply reduced the maximum throughput of each task. Canva had identified a fix and put it into the release process the same day, but it underestimated the impact and did not expedite deployment, so the fix was not live during the incident.

Autoscaling did replace terminated tasks. According to the report, the new tasks were overwhelmed as soon as they became healthy and were killed quickly. Manually raising the desired task count did not stop the cycle.

How it was stopped

At 9:29 UTC, Canva added a temporary Cloudflare firewall rule that blocked all traffic, which let new tasks start without being swamped, and redirected canva.com to its status page. Once healthy task counts stabilized, traffic returned gradually, starting with users in Australia under strict rate limits.

Canva’s listed follow-ups include a runbook for granular traffic rerouting and progressive scale-up, a higher baseline task count and per-task memory for the gateway, load-shedding rules, regular load testing, a patch and multithreaded microbenchmarks for the telemetry code, page-load completion events as a second canary signal, asset fetch timeouts, and continued work with Cloudflare.

Three conditions you can test

The following mapping is this article’s interpretation of the report, not a claim about how Canva tests. Each item names a condition from the incident and a way to reproduce its shape.

1. Synchronized release after a stall

The unusual input here was not heavy sustained traffic. It was 270,000 waiting clients becoming ready in the same instant. A conventional ramp test, where users arrive smoothly over ten minutes, cannot produce that.

Build a release scenario on purpose. Hold a large number of simulated clients at a barrier, then release them together and measure what the next tier sees. In most load tools this means a script that waits on a shared signal or a start time, or an arrival-rate profile with a sharp step instead of a ramp. Express the step in terms of the downstream tier’s normal peak: if the gateway’s peak is P, run a step to 2P and 3P and see what fails first. The three-times figure in Canva’s report is a useful reference for the shape, and your own multiplier should come from your client counts and asset fan-out.

The load tool matters here. A closed-loop generator that waits for each response will not release a herd faster than the system can answer. An open model with a step in arrival rate will. The arrival rate versus concurrency article describes the difference.

2. Per-task capacity with contended code on the hot path

The telemetry bug did not show up as a defect until traffic was heavy, because lock contention scales with concurrency. At low load, re-registering a metric under a lock costs little. At high load, threads queue on the lock and a task that could handle one rate in isolation handles far less.

Two tests would have surfaced that kind of defect. First, a throughput-per-task test on the gateway: drive a single task to saturation before and after a dependency or telemetry change, and compare maximum throughput. A regression in the saturation point is the signal. Second, the multithreaded microbenchmark Canva lists in its follow-ups: run the hot-path library calls from many threads, since a single-threaded benchmark cannot see lock contention.

This kind of check is cheap relative to a full-environment test and belongs in a pipeline that runs on every change to shared code. The throughput knee is the metric to compare.

3. Scaling that arrives while the tier is still saturated

The report says new tasks were overwhelmed as soon as they became healthy. A test that adds a replica to an idle system tells you the startup time. It does not tell you what happens when the replica joins during the herd.

Test scale-out under the step from condition one. Record how long a new task takes to pass health checks, what share of traffic reaches it at that moment, and whether its first seconds under full load keep it alive. Look at memory per task as connections arrive faster than requests complete. If a task dies within seconds of becoming healthy, adding more of them only feeds the loop, which is the behavior the report describes. Mitigations to try in a test environment include a connection or concurrency limit per task, load shedding that rejects early, and a warm-up allowance before a task receives its full share. Whether any one of them fits your system depends on the stack, and the test is how you find out.

The release signal that did not fire

The canary result deserves its own note. The release looked healthy to error-based monitoring because requests hung instead of failing. Canva’s follow-ups add page-load completion events as a secondary canary signal and asset fetch timeouts, which fits that diagnosis.

For testing, the lesson is to include a completion measure next to an error measure. If your synthetic checks or load scripts only count errors, a path where requests never finish scores as healthy. Set timeouts on every request in the script and count timeouts as their own series, and confirm that your release gate fails on a rising count of requests that did not complete.

What this does not tell you

The report does not claim that load testing would have prevented the outage, and this article does not either. Part of the cause was a network fault at a provider that Canva does not control, and a test environment cannot reproduce a stale rule in someone else’s traffic system. What a test can do is establish how the gateway behaves when many clients are released together, how much capacity each task has with the code that ships, and whether scaling helps or hurts during saturation. Those answers shorten an incident like this one from a mystery to a known behavior with a runbook.

A checklist drawn from the report

  • A step-release scenario at two and three times the tier’s normal peak.
  • Saturation throughput per task, compared before and after changes to shared or telemetry code.
  • A multithreaded microbenchmark for hot-path libraries.
  • A scale-out test that adds capacity during saturation, with memory per task recorded.
  • Timeouts counted as a separate series, and a release gate that fails on incomplete requests.
  • A rehearsed way to reduce inbound traffic and bring it back in stages.

If you run these on MaxoPerf, the step profile can be written in the script of whichever executor you use, and failure criteria on error rate and latency can gate the run. The incident’s own conclusion, which is Canva’s and not ours, includes adding regular load testing for the gateway.