Hi,
I've got a farm of squid servers that are accelerating a farm of apache web
servers. We are in the process of setting up the Apache servers as Virtual
hosts and I'd like to pass the Host: header to the Apache servers.
When I applied the below patch to squid 2.2 or the one that Henrik
Nordstrom supplied for squid 2.3 I see a _very_ noticible slowdown. Is it
because of the need to lookup Config.Accel.host for each request? Any other way
to accomplish this?
Thanks!
Miquel van Smoorenburg wrote:
> In article <cistron.3858C5A4.5DEBD750@hem.passagen.se>,
> Henrik Nordstrom <hno@hem.passagen.se> wrote:
> >Miquel van Smoorenburg wrote:
> >> I guess what I want is something in between, I want squid to use
> >> httpd_accel_uses_host_header AND httpd_accel_host 195.64.65.21.
> >> Hmm, so that functionality doesn't exist yet, right ? Okay ...
> >
> >Implementing what you want should be quite trivial however. Something
> >like the following ought to do it (in fwdConnectStart):
>
> Here's the patch I am using right now. If you define httpd_accel_host,
> it is always used as the source HTTP server even if
> httpd_accel_uses_host_header is set. I think that behaviour is
> reasonable and more what you would expect it to do:
>
> --- squid-2.2.5/src/forward.c.orig Wed Jul 7 03:52:50 1999
> +++ squid-2.2.5/src/forward.c Tue Dec 21 13:44:54 1999
> @@ -223,6 +223,10 @@
> if (fs->peer) {
> host = fs->peer->host;
> port = fs->peer->http_port;
> + } else if (fwdState->request->flags.accelerated &&
> + Config.Accel.host && !vhost_mode) {
> + host = Config.Accel.host;
> + port = Config.Accel.port;
> } else {
> host = fwdState->request->host;
> port = fwdState->request->port;
>
> Mike.
> --
> The From: and Reply-To: addresses are internal news2mail gateway addresses.
> Reply to the list or to miquels@cistron.nl (Miquel van Smoorenburg)
Received on Wed Jan 26 2000 - 00:36:24 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:50:43 MST