Re: [squid-users] Can Squid *be* the origin server for certain URLs?

From: Adrian Chadd <adrian@dont-contact.us>
Date: Fri, 1 Dec 2006 11:10:02 +0800

On Thu, Nov 30, 2006, Ben Drees wrote:
> Hi,
>
> I'm running several Squids (2.5 STABLE 12) in a reverse proxy setup
> behind a load balancer. I want the load balancer to be able to health
> check the Squids independent of whether the origin servers are currently
> available (there are other health checks that cover all bases). For
> various reasons, using cachemgr or "cache_object://" urls won't work. I
> would like to carve a magic URL out of the URL space, something like
> "/status", and have Squid just return 200 OK whenever that URL is
> requested. Is there a way to configure such behavior, or will I have to
> touch the code to make this work?

Just use one of the internally-stored icon images as a check:

http://proxy.hostname:port/squid-internal-static/icons/anthony-SOMETHING.gif

Pick an image out of the mime config file and use that to test against.

(Or, if you want, you can do what I've done in the past and trick Squid into
loading a .html file in for a fake mime type; then you can get your load
balancer to fetch the .html from Squid and parse the HTML looking for
key phrases. I've done this under apache and squid just to ensure that
its returning what was requested.)

Adrian

-- 
- Xenion - http://www.xenion.com.au/ - Hosting and Commercial Squid Support -
Received on Thu Nov 30 2006 - 20:09:19 MST

This archive was generated by hypermail pre-2.1.9 : Fri Dec 01 2006 - 12:00:03 MST