infoq.com·3 min read·hard

Cloudflare Adds Configurable HTTP Vary Header Support to Prevent Cache Thrashing

O
Olimpiu Pop
Cloudflare Adds Configurable HTTP Vary Header Support to Prevent Cache Thrashing
✦AI Summary

Cloudflare has introduced configurable HTTP Vary header support to help developers manage cache efficiency. This feature allows operators to normalize or bypass specific request headers, preventing cache thrashing caused by minor variations in client requests.

Why it matters

This update improves website performance and reduces origin server load by optimizing how content delivery networks handle complex HTTP caching rules.

✦Dive DeeperCreate a free account to unlock

InfoQ Homepage News Cloudflare Adds Configurable HTTP Vary Header Support to Prevent Cache Thrashing

Historically, intermediary content delivery networks have treated the HTTP Vary header with caution. Under standard HTTP semantics, the Vary response header indicates to downstream caches that an origin server evaluated specific request headers before generating a response. If a cache respects Vary without transformation, slight syntactic differences in client headers, such as variations in whitespace, casing, or client-preferred language priority orderings, can splinter a single resource into dozens of distinct variants. In an empirical audit of over 120 million HTTP responses across approximately 50,000 top domains, Cloudflare discovered that nearly 3,000 origins varied on four or more request headers, with extreme cases varying across dozens of distinct fields.

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologybusiness
✦

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in