Cloudflare Anycast: why every server runs everything

Cloudflare Anycast: why every server runs everything

What you’ll take away : Cloudflare does not split functions across specialized farms: every server, in every datacenter, runs every service. Combined with Anycast (the same IPs announced everywhere), this yields single-pass inspection, native DDoS absorption and failure isolation — at the cost of limited control over which POP answers you.
Specialized clusters vs “every server runs every service” NET BY ME Specialized clusters (chaining)WAF farmCache farmProxy farmTraffic hairpins between tiers✗Multiple hops, uneven capacityHomogeneous edgeEvery serviceEvery serviceEvery serviceEvery serviceEvery serviceEvery serviceEvery serviceEvery serviceEvery service✓Single-pass inspection, any server

Current state: a homogeneous edge

Cloudflare’s design principle fits in one line: “Every server can run every service” (Cloudflare). Rather than dedicated farms (cache here, WAF there), each machine runs the whole stack. The direct consequence: traffic need not hairpin between tiers, inspection happens in a single pass, and any added capacity benefits every product at once.

Anycast on ingress, unicast on egress NET BY ME Users (anywhere)Anycast ingresssame IPs from every POPBGP routes to nearest POPUnicast egressto the Internet / originOrigin

On the network side, Cloudflare uses Anycast on ingress: the same IPs are announced by every datacenter, and BGP sends the user to the nearest POP. Egress is rather unicast — hence specific mechanisms for egress IPs.

Trade-offs

  • Uniformity vs specialization: a homogeneous fleet is simple to operate and grow, but forbids tuning a farm for a single task.
  • Anycast: proximity and resilience are almost free, but you do not choose which POP answers — which complicates some cases (egress, affinity).

Failure modes (what surprises)

  • Geolocation assumptions: assuming a user always egresses via the same POP is risky; Anycast may route them elsewhere.
  • Egress IP: a third party that allow-lists by source IP must handle the nature of Cloudflare egress (dedicated IP, egress policies).
  • Session-affinity expectations: relying on a specific server is against the model; state must be designed for a distributed edge.

Proving the negative

  • From several regions, verify the same IP answers (Anycast) and measure latency.
  • Confirm that added capacity benefits every service, not one farm.
  • For a partner filtering by IP, validate the dedicated-egress strategy.

Takeaway

The “every server runs everything” homogeneity is not an engineering detail: it is what makes single-pass inspection, scaling and DDoS resilience possible. The corollary to absorb: with Anycast, you do not choose who answers.

A question or some feedback? Reach me on LinkedIn: Mokrane Assam.

Mokrane ASSAM

Comments are closed.

Proudly powered by WordPress | Theme: SpicePress by SpiceThemes