Re: accelerator and squid-2.2.STABLE5.ignore_host_header.patch

From: Jayme Cox <[email protected]>
Date: Wed, 26 Jan 2000 10:47:37 -0800

Miquel,
    Actually, that is exactly the setup we have. (Squid as an accelerator in front
of an Apache server with lots of name based virtual hosts). I've tried both squid
2.2 (with your code changes) and squid 2.3 (with Henrik's code changes) and there is
a significant slowdown with the patched version. It makes no difference if I use an
IP address or a host name for the httpd_accel_host.
    Here is my squid.conf file:
##################################
http_port 80
icp_port 0

visible_hostname qa.zing.com
unique_hostname lclient.zing.com

httpd_accel_host 216.35.13.138
httpd_accel_port 80

httpd_accel_with_proxy off
httpd_accel_uses_host_header on

acl images urlpath_regex \.(gif|jpg|jpeg|png|tiff|swf|js|thm)$
no_cache allow images
cache_mem 128 MB
cache_dir ufs /zing/cache 500 16 256
cache_log /var/squid/logs/cache.log
cache_access_log /var/squid/logs/access.log
pid_filename /var/squid/logs/squid.pid
cache_store_log none
emulate_httpd_log off
mime_table /usr/local/squid/etc/mime.conf
log_mime_hdrs off
log_fqdn off
useragent_log none
debug_options ALL,1
request_header_max_size 10 KB
request_body_max_size 200 MB
reply_body_max_size 0
quick_abort_min -1 KB
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 21 443 563 70 210 1025-65535
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow all

icp_access deny all
miss_access allow all
ident_lookup_access deny all
cache_mgr support@zing.com
cache_effective_user squid
cache_effective_group squid
logfile_rotate 2
forwarded_for on
client_db off
snmp_access allow all
uri_whitespace allow
##############################################

It's a very noticeable difference in speed between the patched version and the non
patched version. Are you experiencing this?

Thanks!

Miquel van Smoorenburg wrote:

> In article <cistron.388EA19E.F9BF8DD9@zing.com>,
> Jayme Cox <jcox@zing.com> wrote:
> > 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?
>
> My patch is only suitable for the following situation:
>
> - the accelerator is not running on the same box as the web server
> - you want to set httpd_accel_host to just one origin server
> - AND you want to turn on httpd_accel_uses_host_header
>
> We're only accelerating one webserver that does name based virtual
> hosting. The IP number of that server is set with httpd_accel_host
> (not a hostname, just the IP) and `httpd_accel_uses_host_header on'
> makes sure the Host: header is passed to the apache server
>
> I'm not sure what you are trying to do
>
> Mike.
> --
> The From: and Reply-To: addresses are internal news2mail gateway addresses.
> Reply to the list or to miquels@cistron.nl (Miquel van Smoorenburg)

--
Jayme Cox
Director of Network Operations
Phone: 415-437-4709 x106
Fax: 415-437-4710
Zing Network, Inc.
550 Fifteenth Street
San Francisco, CA 94103
Received on Wed Jan 26 2000 - 11:57:57 MST

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