| r68 vs r69 | ||
|---|---|---|
| ... | ... | |
| 207 | 207 | |
| 208 | 208 | This post is an in-depth recount of exactly what happened and what systems and processes failed. It is also the beginning, though not the end, of what we plan to do in order to make sure an outage like this will not happen again. |
| 209 | 209 | |
| 210 | {{{+5 The outage}}} | |
| 210 | '''{{{+5 The outage}}}''' | |
| 211 | 211 | |
| 212 | 212 | The chart below shows the volume of 5xx error HTTP status codes served by the Cloudflare network. Normally this should be very low, and it was right up until the start of the outage. |
| 213 | 213 | |
| ... | ... | |
| 225 | 225 | |
| 226 | 226 | The following services were impacted: |
| 227 | 227 | |
| 228 | ||
| 228 | {{{#!wiki style="margin: -5px 0px -10px 0px" | |
| 229 | ||<tablewidth=100%><tablebordercolor=#000,#fff><tablebgcolor=#ffffff,#1c1d1f><colcolor=#000,#fff><width=40%> '''Service / Product''' ||<width=60%><colcolor=#000,#fff> '''{{{#fff,#fff Impact description}}}''' || | |
| 230 | || Core CDN and security services || HTTP 5xx status codes. The screenshot at the top of this post shows a typical error page delivered to end users. || | |
| 231 | || Turnstile || Turnstile failed to load. || | |
| 232 | || Workers KV || Workers KV returned a significantly elevated level of HTTP 5xx errors as requests to KV’s “front end” gateway failed due to the core proxy failing. || | |
| 233 | || Dashboard || While the dashboard was mostly operational, most users were unable to log in due to Turnstile being unavailable on the login page. || | |
| 234 | || Email Security || While email processing and delivery were unaffected, we observed a temporary loss of access to an IP reputation source which reduced spam-detection accuracy and prevented some new-domain-age detections from triggering, with no critical customer impact observed. We also saw failures in some Auto Move actions; all affected messages have been reviewed and remediated. || | |
| 235 | || Access || Authentication failures were widespread for most users, beginning at the start of the incident and continuing until the rollback was initiated at 13:05. Any existing Access sessions were unaffected. | |
| 229 | 236 | |
| 237 | All failed authentication attempts resulted in an error page, meaning none of these users ever reached the target application while authentication was failing. Successful logins during this period were correctly logged during this incident. | |
| 238 | ||
| 239 | Any Access configuration updates attempted at that time would have either failed outright or propagated very slowly. All configuration updates are now recovered. || | |
| 240 | }}} | |
| 241 | ||
| 230 | 242 | As well as returning HTTP 5xx errors, we observed significant increases in latency of responses from our CDN during the impact period. This was due to large amounts of CPU being consumed by our debugging and observability systems, which automatically enhance uncaught errors with additional debugging information. |
| 231 | 243 | |
| 232 | {{{+5 How Cloudflare processes requests, and how this went wrong today}}} | |
| 244 | '''{{{+5 How Cloudflare processes requests, and how this went wrong today}}}''' | |
| 233 | 245 | |
| 234 | 246 | Every request to Cloudflare takes a well-defined path through our network. It could be from a browser loading a webpage, a mobile app calling an API, or automated traffic from another service. These requests first terminate at our HTTP and TLS layer, then flow into our core proxy system (which we call FL for “Frontline”), and finally through Pingora, which performs cache lookups or fetches data from the origin if needed. |
| 235 | 247 | |
| ... | ... | |
| 263 | 275 | |
| 264 | 276 | [[파일:클플 오류6.png|width=100%]] |
| 265 | 277 | |
| 266 | {{{+5 The query behaviour change}}} | |
| 278 | '''{{{+5 The query behaviour change}}}''' | |
| 267 | 279 | |
| 268 | 280 | I mentioned above that a change in the underlying query behaviour resulted in the feature file containing a large number of duplicate rows. The database system in question uses ClickHouse’s software. |
| 269 | 281 | |
| ... | ... | |
| 295 | 307 | |
| 296 | 308 | However, as part of the additional permissions that were granted to the user, the response now contained all the metadata of the r0 schema effectively more than doubling the rows in the response ultimately affecting the number of rows (i.e. features) in the final file output. |
| 297 | 309 | |
| 298 | {{{+5 Memory preallocation}}} | |
| 310 | '''{{{+5 Memory preallocation}}}''' | |
| 299 | 311 | |
| 300 | 312 | Each module running on our proxy service has a number of limits in place to avoid unbounded memory consumption and to preallocate memory as a performance optimization. In this specific instance, the Bot Management system has a limit on the number of machine learning features that can be used at runtime. Currently that limit is set to 200, well above our current use of ~60 features. Again, the limit exists because for performance reasons we preallocate memory for the features. |
| 301 | 313 | |
| ... | ... | |
| 307 | 319 | |
| 308 | 320 | {{{thread fl2_worker_thread panicked: called Result::unwrap() on an Err value}}} |
| 309 | 321 | |
| 310 | {{{+5 Other impact during the incident}}} | |
| 322 | '''{{{+5 Other impact during the incident}}}''' | |
| 311 | 323 | |
| 312 | 324 | Other systems that rely on our core proxy were impacted during the incident. This included Workers KV and Cloudflare Access. The team was able to reduce the impact to these systems at 13:04, when a patch was made to Workers KV to bypass the core proxy. Subsequently, all downstream systems that rely on Workers KV (such as Access itself) observed a reduced error rate. |
| 313 | 325 | |
| ... | ... | |
| 319 | 331 | |
| 320 | 332 | The first period, from 11:30 to 13:10, was due to the impact to Workers KV, which some control plane and dashboard functions rely upon. This was restored at 13:10, when Workers KV bypassed the core proxy system. The second period of impact to the dashboard occurred after restoring the feature configuration data. A backlog of login attempts began to overwhelm the dashboard. This backlog, in combination with retry attempts, resulted in elevated latency, reducing dashboard availability. Scaling control plane concurrency restored availability at approximately 15:30. |
| 321 | 333 | |
| 322 | {{{+5 Remediation and follow-up steps}}} | |
| 334 | '''{{{+5 Remediation and follow-up steps}}}''' | |
| 323 | 335 | |
| 324 | 336 | Now that our systems are back online and functioning normally, work has already begun on how we will harden them against failures like this in the future. In particular we are: |
| 325 | 337 | |
| ... | ... |