I pieced mine out of a few guides but there is an easier way to do this now (assuming you're in RHEL / CentOS world) as Redhat developed a GUI for HA. It's called Piranha:<br><font size="-1"><span class="a">www.<b>centos</b>.org/docs/5/html/Virtual_Server_Administration/ch-lvs-<b>piranha</b>-VSA.html<br>
<br>You can get the RPMs from DAG and the process is pretty simple (at least mine is). I use direct path. On the load balancer just modify the /etc/rc.d/ha/lvs.cf to setup your load balancer and the virtual servers. <br><br>
serial_no = 132<br>primary = <a href="http://1.2.3.10">1.2.3.10</a><br>service = lvs<br>backup_active = 0<br>backup = <a href="http://0.0.0.0">0.0.0.0</a><br>heartbeat = 1<br>heartbeat_port = 539<br>keepalive = 20<br>deadtime = 20<br>
network = direct<br>debug_level = NONE<br>monitor_links = 0<br>virtual mailscanner {<br> active = 1<br> address = <a href="http://1.2.3.5">1.2.3.5</a> eth0:1<br> vip_nmask = <a href="http://255.255.255.0">255.255.255.0</a><br>
port = 25<br> use_regex = 0<br> load_monitor = none<br> scheduler = wrr<br> protocol = tcp<br> timeout = 20<br> reentry = 30<br> quiesce_server = 0<br> server mailscanner1 {<br> address = <a href="http://1.2.3.1">1.2.3.1</a><br>
active = 1<br> weight = 1<br> }<br> server mailscanner2 {<br> address = <a href="http://1.2.3.2">1.2.3.2</a><br> active = 1<br> weight = 1<br> }<br>}<br clear="all"></span></font><br>
So here is the idea, your system runs on <a href="http://1.2.3.10">1.2.3.10</a> and you're going to be pointing the MX to <a href="http://1.2.3.5">1.2.3.5</a> which will then deliver mail down to the actual mailscanner real servers <a href="http://1.2.3.1">1.2.3.1</a> and <a href="http://1.2.3.2">1.2.3.2</a>; Just start pulse and you're done.<br>
<br>Each node needs a loopback interface with the address of the virtual server and <a href="http://255.255.255.255">255.255.255.255</a> subnet mask.<br>/etc/sysconfig/network-scripts/ifcfg-lo:1<br>DEVICE=lo:1<br>IPADDR=<a href="http://1.2.3.5">1.2.3.5</a><br>
NETMASK=<a href="http://255.255.255.255">255.255.255.255</a><br>ONBOOT=yes<br>NAME=loopback<br><br>Some more junk for sysctl.conf (comment out packet forwarding):<br><br>net.ipv4.conf.all.arp_ignore = 1<br>net.ipv4.conf.eth0.arp_ignore = 1<br>
net.ipv4.conf.all.arp_announce = 2<br>net.ipv4.conf.eth0.arp_announce = 2<br>net.ipv4.ip_forward = 1<br><br>Hope that helps (and hope you want to replicate exactly what I have otherwise there is reading involved).. :)<br>
<br>-Vlad
<br><br><div><span class="gmail_quote">On 2/27/08, <b class="gmail_sendername">Alex Neuman</b> <<a href="mailto:alex@nkpanama.com">alex@nkpanama.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> On Feb 27, 2008, at 4:04 PM, Vlad Mazek wrote:<br> <br> > Keep in mind that if you have more than 4 MX records in round robin<br> > the lookup will only return four, throwing the load balancing a bit<br> > out of skew. Linux HA with lvs is dead easy to configure and can do<br>
> quite a bit with cheap hardware.<br> <br> <br>Can you please direct me to a good "howto" or "cookbook" on Linux HA?<br> I've looked around and most are either too specific or outdated.<br> <br>
<br> --<br> <br>MailScanner mailing list<br> <a href="mailto:mailscanner@lists.mailscanner.info">mailscanner@lists.mailscanner.info</a><br> <a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a><br>
<br> Before posting, read <a href="http://wiki.mailscanner.info/posting">http://wiki.mailscanner.info/posting</a><br> <br> Support MailScanner development - buy the book off the website!<br> </blockquote></div><br>