Improving Smart Tiered Cache for Public Cloud Regions
Key Points
- Set region hints for anycast cloud origins
- Detects anycast via latency speed-of-light check
- Maps cloud regions to optimal primary and fallback upper tiers
Summary
Cloudflare’s Smart Tiered Cache now supports public cloud regions (AWS, GCP, Azure, Oracle Cloud) for origins that appear anycast. Engineers can provide a region hint so Cloudflare maps the origin to the correct cloud region and selects an optimal primary and fallback upper tier, reducing cross-continent hairpinning and improving cache efficiency.
Key Points
- When an origin IP is detected as anycast, set a region hint in the dashboard (Caching > Tiered Cache > Origin Configuration > Set Region Hint) or via API/Terraform. Hints can be set per-IP or bulk-edited.
- Anycast detection uses multi-checkpoint latency probes and a speed-of-light constraint: if combined probe latencies are faster than physically possible from a single location, the IP is treated as anycast and won’t be pinned automatically.
- Cloudflare fetches cloud provider IP range files every few hours and uses continuous upper-tier latency probes (refreshed ~every 15 minutes) to map subnets to upper tiers.
- For each cloud region, matching subnets cast weighted votes based on current upper-tier assignments; the strongest signal chooses the region’s primary upper tier and distinct PoPs are chosen for primary and fallback to avoid single-PoP failures.
- If probe data is insufficient for a region, the system falls back to the geographically closest Tier 1 PoP and migrates to data-driven choices as probes accumulate.
- Benefits: fewer origin connections, higher cache hit ratios, and reduced latency from avoided hairpin routing.
How to enable
- Dashboard: Caching > Tiered Cache > Origin Configuration -> edit an anycast-detected origin -> Set Region Hint (examples: aws:us-east-1, gcp:europe-west1).
- API / Terraform: same configuration is available for automation and infra-as-code workflows.
Notes for engineers
- Only origins Cloudflare detects as anycast can be assigned region hints from the dashboard; API/Terraform supports bulk operations.
- Supported providers at launch: AWS, GCP, Azure, Oracle Cloud. More providers planned.
- Configuration hands off selection and failover logic to Cloudflare; your action is to provide accurate region hints for public-cloud anycast origins.