Outage explained
The Cloudflare outage of July 2019, explained
A single new firewall rule contained a regular expression that backtracked badly. Deployed everywhere at once, it took every CPU in Cloudflare’s edge to 100%.
4 min read10 sectionsUpdated
On this page
What happened
Cloudflare’s engineers deployed a new managed rule for its Web Application Firewall, meant to block a type of attack. The rule contained a regular expression that, on certain inputs, caused excessive backtracking. Rules for the WAF were deployed globally at the same time, so within moments every server handling HTTP traffic was spending its CPU evaluating that expression.
With no CPU left, Cloudflare’s proxies returned 502 Bad Gateway errors for traffic across the network. Engineers used a global kill switch to disable the WAF managed rules, traffic recovered, and the rule was fixed and redeployed later.
Lessons for every team
Stage configuration like code
Rules, feature flags and config are changes too. Canary them on a small part of traffic before going global.
Bound expensive operations
Use regular expression engines that guarantee linear time, or set CPU limits on rule evaluation.
Keep a kill switch, and know who can use it
Cloudflare recovered by disabling a whole feature globally. Every risky subsystem should have one.
Watch from outside
Internal dashboards share fate with the systems they watch. Checks from several outside regions keep working when your own network, DNS or monitoring stack does not.
What monitoring can and cannot do here
An outside check on your site would show the 502s at once, and the response headers would show they came from the CDN rather than your origin. See 502 Bad Gateway and the Cloudflare error guides for how to tell where an error comes from.
Source: Cloudflare’s blog post with the details of the July 2 outage. This summary is ours; read the original for the full detail.
What caused the 2019 Cloudflare outage?
A WAF rule with a regular expression that backtracked heavily, deployed to all servers at once, exhausting CPU.
What is catastrophic backtracking?
When a regex engine tries an exponential number of ways to match an input, using huge amounts of CPU on a short string.
How long did it last?
About half an hour of major impact.
Check it now, free
- Is Cloudflare down? Live status: checked every few minutes, with outage history.
- Website down checker: Is it down for everyone or just me? Check any site now.
- Downtime cost calculator: What an outage costs per minute, hour and year.
Related reading
- The CrowdStrike outage of July 2024, explained: How a faulty CrowdStrike Falcon content update crashed millions of Windows machines on 19 July 2024, grounding flights, and the lessons.
- The AWS S3 outage of February 2017, explained: How a mistyped command during debugging took Amazon S3 in us-east-1 offline for about four hours on 28 February 2017, why recovery was slow, and the lessons.
- The AWS us-east-1 outage of December 2021, explained: Why AWS us-east-1 had a multi-hour outage on 7 December 2021: internal network congestion after an automated scaling activity, and the lessons.
- The AWS us-east-1 outage of October 2025, explained: Why AWS us-east-1 failed on 20 October 2025: a race condition left DynamoDB’s DNS record empty, the cascade that followed, and the lessons.
- The Facebook outage of October 2021, explained: Why Facebook, Instagram and WhatsApp went down for about six hours on 4 October 2021: a backbone command, withdrawn BGP routes, unreachable DNS and the lessons.
- The GitLab database incident of January 2017, explained: How an engineer deleted GitLab.com’s production database directory on 31 January 2017, why several backup methods failed, what data was lost, and the lessons.
Know about your own outages first
Uptime checks every minute, alerts with on-call escalation, incident timelines and a status page, with a free tier on every product.