Search squid archive

Re: Stale-if-error , does it work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 3/26/09 11:01 AM, "Dingwell, Robert A. (BOBD)" <bobd@xxxxxxxxx> wrote:

>   I¹ve been trying to get a caching architecture setup so that if a server I
> am caching content for goes down or is more likely just unavailable to do
> network issues I can have the cache serve up the stale content.  In the
> production environment that this will be used I will not have the ability to
> have all of the services involved set cache control headers on their data. We
> are operating on a wan with people all over  the globe so it would be really
> difficult to get everyone to do that.  What I can do though is to make sure
> that everything goes through apache acting as a reverse proxy which then sets
> the Cache-Control header, which I have done and verified that it does indeed
> do what I want it to.
> 
> So now I fire up squid and apache and attempt to access a server I have
> control over and I get back the data I expect to get back.  Look in the squid
> log file see the header in the log ³Cache-Control: stale-if-error=300²  so I
> know it¹s being sent.  Now I shutdown the server I just accessed and attempt
> to access the same url. I expect to get back the same data that I just got
> back but instead I get back the error page saying the service is unavailable.
> Shouldn¹t squid be serving up the stale content?  Or am I missing a step.  The
> other odd thing is once I start the server back up it takes a couple of
> minutes to get back the page from server as squid seams to be caching the
> error page.
> 
> I know that stale-if-error is only going to work for 500-504 errors but
> looking through the squid logs again I see that I am getting an error code
> back when I try to access the page when it¹s down ³HTTP/1.1 503 Service
> Temporarily Unavailable².
> 
> One last thing this article , http://www.mnot.net/blog/2007/12/12/stale ,
> makes it sound like squid has a configuration parameter that is used to enable
> stale-if-error even when the server does not send the control header. Does
> anyone know if this exists or what the magic incantation is to get it working?
> 
>  Anybody have any ideas as to what I may be doing wrong, or an alternative
> approach to accomplishing what I am trying to get working?  I already tried
> using offline mode which did not work and I think isn¹t really what I would
> want to do anyway as I need squid to attempt to access the server and serve up
> the stale data only when the server is down.
> 
> Any help is appreciated ,
> 
> Thanks 
> Rob



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux