Greeting Squid Gurus,
I read an interesting article on Load Balancing in Zope with Squid as an accelerator.
http://www.zope.org/Members/htrd/howto/squid
I wanted to try it using Apache servers as a backend instead of Zope
The problem is the article didn't quite have enough info for me to figure out
how to do it (I did send the author an email) so was hoping someone in
this list could fill me in.
"Squid can also make http requests to other caches, which Zope can understand. Squid contains some sophisticated logic for managing connections to a pool of other caches, and these features prove to be useful for managing a pool of backend Zope servers too"
According to the page I just need to add to my squid.conf (replaced their "backendzope" with "backendApacheName")
"
cache_peer backendApacheName1.dmz.example.com parent 8080 8080 no-digest no-netdb-exchange round-robin
cache_peer backendApacheName2.dmz.example.com parent 8080 8080 no-digest no-netdb-exchange round-robin
acl in_backendpool dstdomain backendpool
cache_peer_access backendApacheName1.dmz.example.com allow in_backendpool
cache_peer_access backendApacheName1.dmz.example.com deny all
cache_peer_access backendApacheName2.dmz.example.com allow in_backendpool
cache_peer_access backendApacheName2.dmz.example.com deny all
never_direct allow all
The never_direct line will ensure that Squid does not try to resolve the backendpool 'host' keyword as if it was a real host name, to connect to it if all the peers are down. You may need a more sophisticated never_direct acl if you have some backend servers which are not presented as peers.
The configuration above assumes that the two backend zopes are providing http and ICP on port 8080. To use ICP you will need to enable it with the --icp command line switch, and you will need to some patches <http://www.zope.org/Members/htrd/icp> for Zope versions before 2.6. Alternatively include the no-query directive in the cache_peer lines.
"
The part I don't understand is the redirection: the page says:
To implement this solution your redirector script must output a URL where the hostname part of the URL is a keyword which describes a pool of backend servers, such as http://backendpool/VirtualHostBase/http/www.example.com:80/a/b/c Note that the hostname part of the URL is not a real host; it is a keyword that will be used in squid's configuration.
I want to try to take advantage of that "sophisticated logic". VirtualHostBase is a a Zope specific keyword. What should my redirectors return
to call an apache backend specified by the backendpool or can it even be done?
Thank you,
John Kent
Received on Wed Jul 14 2004 - 09:33:59 MDT
This archive was generated by hypermail pre-2.1.9 : Sun Aug 01 2004 - 12:00:02 MDT