Re: configure squid on 2 machine

From: Maciej Kozinski <Maciej.Kozinski@dont-contact.us>
Date: Fri, 11 Jun 1999 10:19:42 +0200 (EEST)

Donny Christiaan:

> Red Had 6.0
>
> another machine : Red Hat 5.1
>
> and now i want to use both two of the machine
> to runing as a squid together
> which one is more better as "parent child" or "sibling"
> configuration ...

It depends on network topology in general... :)

Assuming your machines are withing one network or in similar distance to
web resources I suggest declare something like that:

                          |
                          |
                          |
                        router
                          |
              rh51 ---------------- rh 60

rh51:
cache_peer rh6 http_port icp_port proxy-only

rh60:
cache_peer rh51 http_port icp_port proxy-only

This will made their resources complementary one to another.
To dynamically divide the load between them, use the following proxy
autoconfiguration file (for netscape navigator):

var url;
var host;
    function FindProxyForURL(url, host)
        {
            if (shExpMatch (url, "your.domain")) return "DIRECT";
                today = new Date();
                    Sec = today.getSeconds() % 2;
                    if ( Sec == 0 )
                    return "PROXY rh51:8082;"+"PROXY rh60:8080;" +
                            "DIRECT";
                    else
                    return "PROXY rh60:8080;"+"PROXY rh51:8080;" + "DIRECT";

                }
 ret = FindProxyForURL(url, host);

This will make your setup redundant, flexible and load-balanced ;-)

Regards,
Maciej

-- 
           Maciej Kozinski         http://www.uck.uni.torun.pl/~maciek/ 
	   Remember: Un*x _IS_ user friendly... It's just selective about
		     who it's friends are.
Received on Fri Jun 11 1999 - 02:36:59 MDT

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