Skip to content

CONCEPT Cited by 1 source

Latency-based tier selection

Definition

Latency-based tier selection is the technique of continuously measuring round-trip latency from each CDN data center to each origin IP, then selecting the data center with the lowest measured latency as the upper tier (the intermediary through which cache misses are routed to origin).

How It Works (Cloudflare)

  1. Every Cloudflare data center probes every known origin IP on a 15-minute refresh cycle.
  2. The data center with the consistently lowest latency becomes the primary upper tier for that origin.
  3. A separate data center (on a different physical PoP) is selected as the fallback tier.
  4. Edge POPs route cache misses through the primary; if it fails, traffic shifts to the fallback.

Failure Mode: Anycast Origins

When an origin IP is anycast (advertised from multiple cloud provider locations), latency probes become unreliable:

  • Multiple Cloudflare data centers measure similarly low latency because they each reach a different nearby cloud edge.
  • The probing system cannot distinguish "closest to the actual backend" from "closest to the nearest anycast ingress."
  • Result: no clear winner, system falls back to multiple upper tiers or makes suboptimal selections that cause hairpin routing.

Mitigation

Seen in

Last updated · 575 distilled / 1,757 read