On Tue, 13 Nov 2001, Jan dela Cruz wrote:

> hello.
>
> is there any bandwidth load balancer running on linux???
>
> here's my scenario.  i am running a domain, with a webserver, squid proxy,
> and a sendmail mail server inside.  my domain has an IP given to me by my
> ISP (lets call them ISP1).
>
> i have an additional ISP (lets call it ISP2), independent of which my domain
> is connected to (which is ISP1).  i send our outgoing emails to another
> sendmail server (via DNS), which has one of its network card connected to
> ISP2.  my incoming mail server is a separate sendmail server, connected to
> ISP1.
>
> i use DNS changing to what proxy server the users are connecting to) to
> temporarily move over all the www browsing from ISP1 to ISP2 from time to
> time, just observing bandwidth usage.
>
>
> i only have one physical server each for sendmail and squid.
>
> is there a way to configure these servers in such a way that when one of the
> bandwidth has heavy traffic or is slow, the load is passed (or
> load-balanced) in the other bandwidth (especially squid proxy)?

First you need to configure equal cost multipath in the kernel.  This will
allow your linux boxes to have two or more default routes which the kernel
will happily load balance.

> in case the ISP1 is loaded, how would the emails which entered thru ISP2
> (not thru where my incoming email server is directly connected to) be sent
> to the original mail server (since I only have 1?)

Configure your mail server with two IP addresses, and set up ip rules
which essentially say:

from ip-of-isp-1/32 lookup 91
from ip-of-isp-2/32 lookup 90

and then you have two routing tables, 91, 92

ip route add default via gateway-of-isp-1 table 91
ip route add default via gateway-of-isp-2 table 90

This will force all reply packets from ISP2 to go out via the link of ISP2
and vice versa.

You need for this:

configure the kernel advanced router
iproute2 package


> solving this would also address bandwidth redundancy, in case ISP1 is down,
> ISP2 will handle all the load.

You will still have to redirect all traffic from ISP1 via ISP2 and do some
DNS gymnastics, so that no one queries the servers with IP addresses of
ISP1

> how can these be implemented?  what software / hardware is needed to attain
> this fully load balanced, redundant setup?

Linux!  Everything you need is already built into Linux!


_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to