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!
Explore Answers
Who are cloud consumers?
Is it hard to get into meta?
How to become a system designer?
Netflix Culture Interview Tips
Learn how to ace Netflix’s culture interview as a software engineer by aligning with its “Freedom and Responsibility” philosophy. Includes real examples, trade-offs, and expert interview tips from ex-FAANG engineers.
Which language is best for open source contribution?
How can I improve my tech resume?
Related Courses
Course image
Grokking the Coding Interview: Patterns for Coding Questions
Grokking the Coding Interview Patterns in Java, Python, JS, C++, C#, and Go. The most comprehensive course with 476 Lessons.
4.6
Discounted price for Your Region

$197

Course image
Grokking Modern AI Fundamentals
Master the fundamentals of AI today to lead the tech revolution of tomorrow.
3.9
Discounted price for Your Region

$78

Course image
Grokking Data Structures & Algorithms for Coding Interviews
Unlock Coding Interview Success: Dive Deep into Data Structures and Algorithms.
4
Discounted price for Your Region

$78

Image
One-Stop Portal For Tech Interviews.
Copyright © 2026 Design Gurus, LLC. All rights reserved.