Documentation

Fast 503 reports from Cloudflare Speed Brain

Your site sits behind Cloudflare, Chrome reports hundreds of 503 network errors, and nobody complains. The likely cause is Cloudflare Speed Brain: failed link prefetches, not failed page loads. They are harmless, and you can switch them off.

Recognize the signature

Speed Brain reports share every one of these traits:

Field Value
type / phase http.error in the application phase
method / status_code GET, 503
elapsed_time Under about 100 ms, often 10–50 ms
server_ip A Cloudflare edge address from Cloudflare's IP ranges
referrer A page on your site that links to the reported URL
Browser Chromium only (Chrome, Edge)

The general rule: an application-phase error answered in a few milliseconds from a CDN address means the CDN answered, not your origin. Your application cannot respond that fast from behind the CDN.

To find these reports, pick Show filtered on the reports list, since the noise rule filters them, then filter by status code 503, phase application and a maximum elapsed time of 100 ms. Agents using the MCP server pass the same filters and include_filtered: true to list_reports.

Why Speed Brain produces 503s

Speed Brain is on by default on Cloudflare's Free plan. It works like this:

  1. Cloudflare adds a Speculation-Rules header to your HTML responses. Its rules tell Chromium to prefetch same-site links with conservative eagerness: when a visitor presses down on a link.
  2. The browser sends the prefetch with a sec-purpose: prefetch request header.
  3. Cloudflare answers prefetches from its cache only and never forwards them to your origin. A prefetch it cannot serve, such as a cache miss, returns 503.
  4. Pages behind a login are never in Cloudflare's cache, so every prefetch of them misses. Chrome files a network error report for each 503.
  5. The visitor's click that follows is a normal request. It reaches your origin and succeeds.

Cloudflare's own Error 503 guide lists these as unsuccessful Speed Brain prefetches that "can be discarded" and are "not visible to visitors of your website".

Confirm it on your site

  • Check the response headers. Open DevTools on one of your pages: a Speculation-Rules header you did not set comes from Speed Brain.
  • Check the zone setting. In the Cloudflare dashboard, go to Speed › Settings › Content Optimization, or read speed_brain through the API.
  • Match the report against Cloudflare's request log. Take the report's Occurred time and look up the reported URL for that minute in Cloudflare's HTTP request analytics or logs. You will find no 503 for it, and a successful request for the same URL shortly after.
Read Occurred as it is: Browsers send network error reports late and say how late in the report's age. The Occurred time already has that delay subtracted, so compare it with CDN logs directly. Don't subtract age again.

A network error report carries no request headers, so sec-purpose: prefetch never shows in the report itself. The proof is the signature above plus the reports stopping once Speed Brain is off.

Stop the reports

Pick the fix that matches your site:

  • Turn Speed Brain off for the zone. The right choice when most of your HTML sits behind a login: every prefetch misses, so Speed Brain costs requests and gains nothing. Use the dashboard toggle, the API, or your Terraform or OpenTofu zone settings. The toggle applies to the whole zone.
  • Send your own Speculation-Rules header from your origin. Cloudflare does not override a header your origin sets. Use it to replace Speed Brain's rules, or narrow prefetching to the paths that are cached.
  • Make public HTML cacheable at the edge. Prefetches of cached pages hit and return 200. This only fits public pages, never pages that depend on a session.
  • Keep Speed Brain and rely on the filter. The reports are harmless, and we filter them as known noise: see Filtered as known noise.
Bash Turn Speed Brain off through the Cloudflare API
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/speed_brain" \
  --request PATCH \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --json '{"value": "off"}'

What you give up in a Hotwire Turbo app

Nothing that Turbo doesn't already do. Turbo Drive replaces link navigations with its own fetch() requests, while a speculation-rules prefetch only speeds up a full browser navigation. And Turbo 8 prefetches links on hover itself, against your origin and with the visitor's session.

What to expect

In a multi-tenant Rails app behind Cloudflare, with its pages behind a login, fast 503 reports ran at 47 to 254 per weekday. On the first business day after Speed Brain was turned off, there were none. Real network errors kept arriving as before.

Filtered as known noise

State: On

The Cloudflare Speed Brain prefetch noise rule filters network error reports with the signature of a link prefetch a Cloudflare edge couldn't serve from its cache: a 503 in the application phase, answered in under 50 ms from an address in Cloudflare's published IP ranges. Filtered reports never notify, and an issue made only of them is hidden from the default issue list. Pick Show filtered, or pass include_filtered: true over MCP, to see them.

What it can hide: a real 503 from your origin that Cloudflare relays in under 50 ms. An origin that answers that fast behind Cloudflare is rare, and a slower 503 stays in your lists. Both options work: turning Speed Brain off stops the requests, not only the reports, while keeping it leaves the filter to handle them.

Side note: Early Hints 504s

With Early Hints on, Cloudflare's logs show 504 responses with the request source earlyHintsCache. They are Cloudflare's internal lookups for cached Link headers: a 504 means a cache miss. They never reach your visitors or your origin, and they create no network error reports.

Next steps