Re: Squid accelerator mode

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 23 Jun 2000 02:28:55 +0200

httpd_accel_host directive might only be used once.

How Squid operates when it runs as an accelerator:

1. The request is received, and acceleration is detected by not seeing a
full URL

2. Squid reconstructs the full URL from the request data. The URL
reconstruction is controlled by httpd_accel_uses_host_header and
httpd_accel_host.

How the host component of the URL is reconstructed:

if httpd_accel_uses_host_header and Host header available
   Use hostname from Host request header.
else if httpd_accel_host virtual
   Use IP address where the request was received
else
   Use httpd_accel_host value

For the port component, httpd_accel_port is always used.

This reconstructed URL is then processed like in normal proxing. I.e.
first sent to access control, then to the redirectors and finally
fetched.

If you have multiple backend servers with identical content, then the
best way to handle this is to have a internal DNS name listing all the
IP addresses for the service, and then have the accelerator en up in a
URL using this internal name.

--
Henrik Nordstrom
Squid hacker
Wojtek Kaliwoda wrote:
> 
> > Hi,
> >
> > I have question about accelerator mode in Squid. It's written in the
> > documentation  than when Squid is in accelerator mode it fetches
> > documents from one or more origin servers.
> >
> > I need to achieve solution, when user sends http request to machine A,
> > which has some cache. If the requested page is not in cache, machine
> > will send a request to one of the set of http servers (!!!), then it
> > handles the answer, stores it in cache (if needed) and resends to a
> > client. The IP packet should have source address of machine A (the
> > solution is transparent to client).
> >
> > It's very important that in case of some http server are down, Squid
> > won't redirect http request to these servers or in some way get the
> > answer from other (alive, if any) http server.
> >
> > As far as I know it can be configured using Squid accelerator mode, but:
> > 1. Is it configured using httpd_accel_host multiple times in squid.conf
> > file?
> > ex.
> >         httpd_accel_host IP_A
> >         httpd_accel_host IP_B
> >         ....
> >         httpd_accel_port 80
> >
> > 2. If it is true, how Squid selects real origin http server from the
> > above list? Using round-robin procedure? And what happens if one of them
> > goes down. Is there a possibility that Squid will "omit" that server?
> >
> > If it's not possible to solve using Squid software, maybe you can help
> > me in finding an appropriate one.
> >
> > Thank you very much for an answer and help in advance
> > Arkadiusz Kaliwoda
> > Agora SA
Received on Fri Jun 23 2000 - 09:25:41 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:09 MST