Bug 58880 - Support serving stale content while revalidating cache (RFC 5861)
Summary: Support serving stale content while revalidating cache (RFC 5861)
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cache (show other bugs)
Version: 2.5-HEAD
Hardware: PC Linux
: P2 enhancement with 4 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-17 05:07 UTC by Daniel
Modified: 2016-01-17 05:07 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2016-01-17 05:07:02 UTC
In the interest of giving users immediate satisfaction, mod_cache should support the “Cache-Control: stale-while-revalidate=600” extension RFC 5861. Without this extension, every users enters a lottery were the lucky winner have to wait while the backend generates a new response (the “Thundering Herd” revalidating-lock logic). That user will be dissatisfied.

This unlucky user is often a search engine, which will access every resource and is highly likely to encounter expired resources. Site speed being an important metric in modern search ranking causes websites running httpd to be negatively affected.


RFC 5861 also adds “Cache-Control: stale-if-error=600”, but httpd already provides this through the CacheStaleOnError directive. Supporting this header would be good, but offers no immediate new benefit like stale-while-revalidate does.

Similar to the CacheStaleOnError directive, there should also be a CacheStaleWhileRevalidating directive.