Connection Synchronization question

James Bromberger jbromberger at fotango.com
Thu Jul 8 08:44:14 BST 2004


>> If you are using something like heartbeat to start and stop
>> ldirectord,
>> then you don't want the synchronisation daemons handled there,
>> else the synchronisation daemon won't run when the ldirectord
>> resource is relinqushed on a node, and this really isn't what
>> you want.
>>
>> ipvsadm has an init script, You should be able to use that
>> to start and stop the daemons.
>
> Well here's what I am going to be doing in my next cluster going live
> very soon now (sm).  If anyone sees anything silly please let me know.
> Note that if you copy my config you will have to change
> /etc/ha.d/update's SSH line to the proper host, and reverse it for the
> backup host.  You will also probably want an ssh-public key login 
> setup,
> although I'm not certain I'm going to do this.
>
> </etc/ha.d/resource.d/lvsstate.sh>
> #!/bin/sh
> # script to set the sync state properly on both LVS servers.
>
> case "$1" in
>   start)
>     /sbin/ipvsadm --stop-daemon
>     /sbin/ipvsadm --start-daemon master
>   ;;
>   stop)
>     /sbin/ipvsadm --stop-daemon
>     /sbin/ipvsadm --start-daemon backup
>   ;;
> esac
>

May be the is wrong, but we run ldirectord on both master and standby 
hosts ALL the time. We also run "ipvsadm --start-daemon master" and 
"ipvsadm --start-daemon backup" on BOTH hosts all the time (2.6 
kernel). The ONLY thing that heartbeat is doing is brining the service 
IP addresses up and down. That way ldirectord doesn't need 10 seconds 
or so to check services before they come into service: everything is 
instant. Maybe this is wrong, but it works really well. Our failover 
time is less than half a second, and all state is retained. Fail back 
can happen immediately as well...


   JEB



More information about the lvs-users mailing list