Explain CDN Stale-While-Revalidate.

CDN stale-while-revalidate is an HTTP caching strategy that lets a CDN serve stale content instantly while it fetches a fresh copy from the origin in the background.

When to Use

Use this when low latency is critical but a small window of stale data is acceptable. It’s perfect for high-traffic sites, dashboards, or APIs where content refreshes periodically, like e-commerce catalogs or news feeds.

Want to master caching and interview-ready system design?

Explore Grokking System Design Fundamentals, Grokking the System Design Interview, Grokking Database Fundamentals for Tech Interviews, or practice with Mock Interviews with ex-FAANG engineers.

Example

A news site can show yesterday’s cached homepage instantly while silently refreshing the latest version, so readers always load fast pages.

Why Is It Important

This approach reduces origin load, improves backend performance, and guarantees fast responses, preventing cache stampedes when content expires.

Interview Tips

Highlight how stale-while-revalidate balances speed and freshness. Mention that it’s part of HTTP cache-control headers and explain with a real-world scenario.

Trade-offs

The trade-off is speed vs. freshness: users get faster loads, but the content may be slightly outdated. It also requires careful TTL tuning.

Pitfalls

Common mistakes include using this on rapidly changing data (e.g., stock prices) or misconfiguring cache-control headers, which can lead to over-served stale responses.

TAGS
System Design Interview
System Design Fundamentals
CONTRIBUTOR
Design Gurus Team
-

GET YOUR FREE

Coding Questions Catalog

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Image
One-Stop Portal For Tech Interviews.
Copyright © 2025 Design Gurus, LLC. All rights reserved.