Re: [squid-users] Squid 2.7 behaviour when run as caching reverse proxy when origin web site down

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 07 Aug 2010 18:03:01 +1200

Sean Dockery wrote:
> Hello everyone,
>
> I tried searching MARC for an answer to my question, but gave up after about an hour of reading unrelated threads.
>
> I have an intranet application that depends upon graphics generated by an external web site, the results of which depend upon GET request query parameters.
>
> I would like to use Squid in two capacities:
> 1. To cache the graphics so as to reduce the load on the external web site, as well as improve the performance of the intranet application, and
> 2. To allow the intranet application to survive (hopefully) temporary service interruptions experienced by either our data centre or the external web site.
>
> To this end, I have set up Squid as a reverse proxy for the external web site. This satisfies #1.
>
> I have examined the HTTP response headers returned with the graphic resources, and they include a Cache-Control header as follows:
>
> Cache-Control: max-age=7200
>
> I've read Mark Nottingham's blog about the stale-when-validation and stale-if-error options. In the absence of these Cache-Control options, what do I have to do (if anything) to have Squid serve the cached (and possibly stale) content if there are errors connecting to the origin web site? The graphics for any given set of GET request query parameters are static, so the graphics that are generated for any given request can essentially be reused indefinitely.
>
> Thanks.

Those are headers set by the server. So best get onto the server app
authors or admin to add them.

In absence of stale-while-revalidate there is the refresh_pattern
override of the same name.

In absence of stale-if-error there is max_stale directive.

Its also worth checking that you are actually caching the dynamic content:
   http://wiki.squdi-cache.org/ConfigExamples/DynamicContent

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.6
   Beta testers wanted for 3.2.0.1
Received on Sat Aug 07 2010 - 06:03:14 MDT

This archive was generated by hypermail 2.2.0 : Sat Aug 07 2010 - 12:00:02 MDT