Re: Selective Squid Accelerator ?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 03 Jun 1997 22:21:39 +0200

Yes it can be done. Squid currently supports two models for accelerating
multiple servers.

1. Server selection based on interface IP.
http_accel virtual 81

2. Server selection based on Host: header
http_accel localhost 81
http_accel_uses_host_header

If you are accelerating multiple servers on different machines, then
2 is better written as
http_accel real-www.my.domain 80
http_accel_uses_host_header
to send all requests without Host: header to real-www.my.domain.

You can the redirector to rewrite the addresses to accelerate servers
that are on different machines.

A short example. www1.my.domain and www2.my.domain, both on separate IP
adresses.

1. Add http_accel virtual 81 to squid.conf
2. Write a redirector that rewrites http://ip-for-www1:81/ to
http://new-location-of-www1:81/ (and similary for www2)
3. Move the servers to new adresses (keeping the server names in the
server setup.. only change network address and name).
4. Set up virtual interfaces on your squid box, and give them the www1
and www2 adresses.

To verify 3, try

----
telnet new-www1 80
GET /somedir HTTP/1.0
-----
The response should be a redirect looking like this
Location: http://www1.my.domain/somedir/
and NOT
Location: http://new-www1.my.domain/somedir/
If you want to use squid as a load balancer it might be possibe to do 
---
Henrik Nordström
Received on Tue Jun 03 1997 - 13:40:53 MDT

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