**Cloudflare Enhances Smart Tiered Cache for Public Cloud Origins Behind Anycast**
In 2021, Cloudflare introduced **Smart Tiered Cache**, a feature designed to optimize content delivery by selecting the best upper-tier data center based on real-time latency to the origin. While effective for many setups, customers with origins behind public cloud anycast or regional unicast IPs faced limitations — because the origin IP could appear equally close to multiple data centers, latency probes couldn’t identify a single optimal path, resulting in suboptimal routing and potential cross-continent “hairpinning.”
Today, Cloudflare has addressed this gap by rolling out **Smart Tiered Cache for Public Cloud Regions**. The enhancement allows users to provide a cloud region hint (e.g., `aws:us-east-1` or `gcp:europe-west1`), enabling Cloudflare to map public cloud anycast IPs to the correct regional network and select better primary and fallback upper-tier PoPs. The feature is now available for origins hosted on **AWS, Google Cloud, Azure, and Oracle Cloud**, with more providers planned.
—
### Why Anycast Cloud Origins Are Challenging
Smart Tiered Cache traditionally works by probing origin IPs from multiple Cloudflare data centers and choosing the one with the lowest latency. This approach works well with static unicast IPs. However, public cloud providers often use anycast or regional unicast for load balancers and ingress points — meaning a single IP can be reachable from multiple physical locations.
When this happens, latency measurements become ambiguous. For example, an origin in Singapore behind a cloud provider’s anycast IP might appear closest to Cloudflare’s Chicago data center. If Smart Tiered Cache selects Chicago as the upper tier, a user in Asia could experience **hairpinning**: their request travels locally to Cloudflare, then crosses the continent to Chicago, and finally back across the ocean to the Singapore origin — adding significant latency.
—
### Detecting Anycast with Physics
To automatically detect these scenarios, Cloudflare uses a clever approach grounded in physics: the speed of light. By measuring probe latencies from multiple checkpoint data centers, Smart Tiered Cache can determine whether two observed paths are faster than physically possible for a single origin location. If so, the origin is likely anycasted.
When an anycast origin is detected, Smart Tiered Cache avoids pinning traffic to a single upper tier. Instead, it spreads requests across multiple upper-tier PoPs, which maintains resilience and higher cache hit ratios — though not always ideal for latency-sensitive workloads. Until now, there hasn’t been a way to enjoy single-POP efficiency for anycast cloud origins.
—
### How to Use the New Region Hint
The solution is opt-in and straightforward:
1. Navigate to **Caching > Tiered Cache > Origin Configuration** in the Cloudflare dashboard.
2. Locate your origin IP and click **Set Region Hint**.
3. Specify the appropriate cloud region.
Once set, Cloudflare uses the hint to override ambiguous probe results and select the optimal upper tier for that region. The same configuration can also be applied in bulk, via API, or through Terraform, making it easy to integrate with infrastructure-as-code workflows.
—
### How It Works Behind the Scenes
Cloudflare continuously updates its mapping of cloud IP ranges by downloading provider network lists every few hours. These are matched against upper-tier performance data collected from continuous latency probes across a global network of PoPs.
For each supported cloud region, votes are weighted by current upper-tier assignments. The top-performing point of presence becomes the primary upper tier, while a second, geographically distinct PoP serves as fallback — ensuring resilience even during outages.
In regions with limited probe data, Cloudflare falls back to geographic proximity until real-world performance data becomes available. As more origins are onboarded, the system quietly transitions to data-driven routing.
—
### Try It Now and What’s Next
Smart Tiered Cache for Public Cloud Regions is currently available to all Cloudflare customers at no additional cost. If your origin sits behind a public cloud anycast IP, we encourage you to set a region hint today and experience improved latency and reduced cross-traffic.
Looking ahead, Cloudflare will continue expanding provider coverage and refining detection logic to support additional origin architectures — all with the goal of automatically adapting to your infrastructure and optimizing performance without manual tuning.
For more details, see our [Tiered Cache documentation](https://developers.cloudflare.com/smart-routing/tiered-cache/).
—
**Source:**
“We made our most popular tiered cache topology smarter.” Cloudflare Blog.
https://www.cloudflare.com/blog/smart-tiered-cache-for-public-cloud-regions



