Random ...
December 2017
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Tags ...

python+zope++:: squid2.6 as httpd accelerator for zope (and other web servers)
Posted at 01.Aug,2006 12:54  Comments 0 /
Technorati tag(s):

Squid-2.6 is a bit different compared to earlier squid versions. In older version, there's a config option httpd_accel to let squid act as an httpd accelerator.

Squid 2.6 no longer have that option. Now, to configure squid as an httpd accelerator, one must play around with cache_peer* options.

Here's the relevant options to accelerate zope or any other web server, for that matter:

 http_port vhost vport
 cache_peer    parent    80  0  originserver default
 acl apache rep_header Server ^Apache
 broken_vary_encoding allow apache 
 maximum_object_size_in_memory 80 KB
 logformat combined %>a %ui %un [%tl] "%rm %ru  HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
 emulate_apache_log on
 collapsed_forwarding on
 vary_ignore_expire on

cache_peer is our web server (apache/zope/etc) that is the parent listening on port 80, and is the originserver (to be httpd accelerator)

collapsed_forwarding is enabled because the default config says:

 #       This option enables multiple requests for the same URI to be
 #       processed as one request. Normally disabled to avoid  increased
 #       latency on dynamic content, but there can be benefit from enabling
 #       this in accelerator setups where the web servers are the bottleneck
 #       and reliable and returns mostly cacheable information.

so I guessed I'd try it.

One plus for squid-2.6 is that we can now customized log. In the config, I used combined log. Previously, I have to patch squid. I guess the patch was incorporated into squid-2.6.

Bookmark and Share

Is this entry helpful? Comments/Donate/Click some google ads.  
Trackback is http://myzope.kedai.com.my/blogs/kedai/94/tbping 

Post a comment