IL-0257 Canva · 2024-11-12networkingaws
canva.com went down for about 50 minutes when 1.5 million requests per second OOM-killed every API Gateway task
Canva's editor is a single-page application deployed several times a day; each deployment publishes over 100 new static assets, including JavaScript files, to an AWS S3 bucket. Clients fetch them through Cloudflare's tiered cache, where local data centers ask regional or upper-tier data centers and those ask the S3 origin. The editor's JavaScript then calls the API Gateway, the entry point for all of Canva's API requests, which handles authentication, authorization and rate limiting, is built on Netty and runs as an autoscaled group of tasks on Amazon ECS.
According to Cloudflare, a stale rule in its traffic management system was sending user IPv6 traffic over public transit between Ashburn and Singapore instead of over its private backbone, and the rule kept Cloudflare's automation from routing around the packet loss. Cloudflare's cache stream feature (Concurrent Streaming Acceleration) consolidates user requests for the same asset into a single request, so more than 270,000 requests waited on one slow fetch and were released together at 9:07 AM UTC. The resulting 1.5 million requests per second met an API Gateway weakened by a performance regression in Canva's telemetry library: certain metrics were re-registered each time a value was recorded, under a lock in a third-party library, and the lock contention on the event loop threads sharply cut how much one task could handle. A fix for that bug had entered the release process the same day, but its impact had been underestimated and it was not expedited. Off-heap memory growth led the OOM killer to terminate all API Gateway containers, faster than autoscaling could replace them.
At 9:29 AM UTC Canva added a temporary Cloudflare firewall rule that blocked all traffic at the CDN, so new API Gateway tasks could start without being flooded, and later redirected canva.com to its status page. Once the number of healthy tasks was stable, Canva restored traffic step by step, starting with Australian users under strict rate limits. Cloudflare removed the traffic management rule that had sent requests over the lossy path.
- Severity
- –
- Scope
- canva.com was unavailable from 9:08 AM UTC to about 10:00 AM UTC; before that the editor's object panel did not load for many users
- Users affected
- –
- Region
- The object panel failure hit many users in Asia, and requests backed up from users in Southeast Asia
- Time to detect
- –
- Time to resolve
- 52m
Symptoms
On 12 November 2024, after a new version of Canva's editor was deployed at 8:47 AM UTC, the editor's object panel stayed in a perpetual loading state for many users, particularly in Asia. Then from 9:08 AM UTC to about 10:00 AM UTC canva.com was unavailable and all requests to it failed.
The object panel was waiting for one JavaScript chunk delivered through Cloudflare. The network path between Cloudflare's Singapore (SIN) and Ashburn (IAD) locations had latency problems: the 90th percentile time-for-first-byte rose by over 1700%, packet loss on the path reached about 66% at peak, and the fetch of that one asset took 20 minutes. Canva's canary system, which normally aborts a deployment when errors rise, recorded no errors because the requests never completed, while more than 270,000 user requests for the file waited on the same Cloudflare cache stream.
At 9:07 AM UTC the fetch completed and all waiting requests finished at once. The object panel loaded on every waiting device together, sending 1.5 million requests per second to the API Gateway, three times the typical peak. Requests backed up, the load balancers opened new connections to the already overloaded tasks, off-heap memory grew, and the Linux Out Of Memory Killer terminated all running API Gateway containers within the first 2 minutes.
Autoscaling started replacement tasks, but each new task was overwhelmed by the traffic as soon as it was marked healthy and was terminated. Raising the desired task count by hand did not stop the new tasks from being terminated.
Root cause
Root cause Dependency failure
- Trigger
- At 8:47 AM UTC a new version of the Canva editor page was deployed, and client devices began fetching its new static assets through Cloudflare while the network path between Cloudflare's Singapore and Ashburn locations was losing packets.
Detection
–
Remediation
- Added a temporary Cloudflare firewall rule at 9:29 AM UTC that blocked all traffic at the CDN so new API Gateway tasks could start
- Redirected canva.com to the status page
- Restored traffic gradually, starting with Australian users under strict rate limits
Action items
- Write a runbook for rerouting, blocking and progressively restoring traffic
- Show users a more informative error page when canva.com is unavailable
- Raise the baseline number of API Gateway tasks and the memory of each task
- Add load shedding rules to the API Gateway for similar traffic patterns
- Load test the API Gateway regularly
- Deploy the patch for the thread-locking bug in the telemetry library
- Add multithreaded tests for the contended code path to the telemetry library microbenchmark suite
- Use page load completion events as a second canary indicator for page asset releases
- Experiment with adding another rollout stage to the canary to give more time to detect issues
- Add timeouts so user requests do not wait excessively long for assets
- Work with Cloudflare to understand the system interactions behind the incident
Lessons
–
Sources
Related cases
IL-0515Downloads from files.pythonhosted.org failed with intermittent 502 and 503 errors for two weeks, breaking PyPI installsPython Software Foundation · 2026same root cause · shared CDN and edge network
IL-0267Wikimedia's eqsin cache site went unreachable when both of its transport links to the core data centers were downWikimedia Foundation · 2023same root cause · shared CDN and edge network
IL-0398GOV.UK showed "Error 503 Service Unavailable" pages for under an hour during a global outage of its primary CDNGovernment Digital Service · 2021same root cause · shared CDN and edge network
Check your cluster for this
For AI tools and scripts
- This case as JSON: https://incidentlib-api.benchlet.com/cases/IL-0257
- The cases most like it: https://incidentlib-api.benchlet.com/cases/IL-0257/similar
- MCP server (Streamable HTTP, no key):
https://incidentlib-mcp.benchlet.com/mcp
The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.