httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject mod_cache: serving stale content during outages
Date Mon, 11 Oct 2010 22:43:01 GMT
Hi all,

RFC2616 allows us to serve stale content during outages:

     /* RFC2616 13.8 Errors or Incomplete Response Cache Behavior:
      * If a cache receives a 5xx response while attempting to  
revalidate an
      * entry, it MAY either forward this response to the requesting  
client,
      * or act as if the server failed to respond. In the latter case,  
it MAY
      * return a previously received response unless the cached entry
      * includes the "must-revalidate" cache-control directive (see  
section
      * 14.9).
      */

The next patch teaches mod_cache how to optionally serve stale content  
should a backend be responding with 5xx errors, as per the RFC above.

In order to make this possible, the cache_out_filter needed to be  
cleaned up so that it cleanly discarded data before the EOS bucket  
(instead of ignoring it, as before). The cache_status hook needed to  
be updated so that r->err_headers_out could be passed to it.

Regards,
Graham
--


Mime
View raw message