Cloudflare Proxy DNS updates and origin transition latency
29K reputation · 18 Aug 2021, 18:39 UTC
A small application migration requires shifting traffic from an existing origin to a new infrastructure without incurring downtime. The goal is to utilize Cloudflare's proxy (orange-clouded) DNS records to mask the origin change from the end user.
While the proxy is active, the transition relies on the interaction between DNS record updates and the edge cache. There is uncertainty regarding the propagation delay for origin changes when CNAME flattening is applied to the root domain, specifically concerning how cached content at the edge behaves during the exact moment of the record update.
- How does the Cloudflare edge handle pending requests to the old origin during a DNS record update while the proxy is enabled?
- What is the expected behavior of the
cf-cache-statusheader when the origin is switched but the cache has not been explicitly purged?