Replacing ldirectord/heartbeat with LVS/piranha/pulse

Edward Croft croftale at gmail.com
Tue Mar 10 19:29:39 UTC 2009


I have my systems set up in simple failover. FW1 --> FW2, APP1 --> APP2 and
so forth. So at any time, I only have one active server running. If FW1
fails for whatever reason, FW2 is monitoring and takes control. It then
moves the shared external and shared internal addresses to itself. APP1 and
APP2 both use the internal shared address of the FW's for their gateway. The
app servers are doing basically the same except they only have a shared
internal address.
Here is a sample lvs.cf file. You would use the same file on both servers.
In this instance it is the firewall, so it manages two interfaces.

/etc/sysconfig/ha/lvs.cf
serial_no = 74
primary = FW1external (you would change this to your own external numbers
xx.xx.xx.xx)
service = fos
backup_active = 1
backup = FW2external
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = nat
reservation_conflict_action = preempt
debug_level = NONE
failover firewallext {
     address = FWSharedExt eth0:1
     vip_nmask = 255.255.255.192
     active = 1
     port = 80
     timeout = 6
     send = "GET / HTTP/1.0\r\n\r\n"
     expect = "HTTP"
     start_cmd = "/etc/rc.d/init.d/httpd start"
     stop_cmd = "/etc/rc.d/init.d/httpd stop"
}

failover firewallint {
     address = FWSharedInt eth1:2
     vip_nmask = 255.255.255.0
     active = 1
     port = 80
     timeout = 6
     send = "GET / HTTP/1.0\r\n\r\n"
     expect = "HTTP"
     start_cmd = "/etc/init.d/httpd start"
     stop_cmd = "/etc/init.d/httpd stop"
}




2009/3/9 Sean Drill <sean.drill at staff.westnet.com.au>

>  I am not sure if I am misreading this, but it appears that the FOS can
> only occur at the server level, and not at the node level
>
> What I am trying to configure is....
>
>
> Active LVS Server            Backup LVS
> |
> |
> |-- VIP (HTTP)
>         |
>         |- Active HTTP
>         |
>         |- Backup HTTP
>
> In doing so I will have two layers of redundancy. The first layer will be
> if the LVS server hosting the VIP's fails, it will fail over to the backup
> LVS server. This functionality is default for LVS. However I also require
> redundancy at the node level. So if the active HTTP server fails, it moves
> to the backup HTTP server, without initiating a failover to the Backup LVS
> server.
>
> From what I am reading (I could be misreading) FOS occurs at the server
> level, and not at the node level. Basically I want all HTTP traffic to be
> handled by the Active HTTP server, and have the backup only take over if I
> choose to fail it over, or the active server fails on its own.
>
> Cheers
>
> - Sean
>
>  ------------------------------
> *From:* piranha-list-bounces at redhat.com [mailto:
> piranha-list-bounces at redhat.com] *On Behalf Of *Edward Croft
> *Sent:* Tuesday, 10 March 2009 3:17 AM
> *To:* Piranha clustering/HA technology
> *Subject:* Re: Replacing ldirectord/heartbeat with LVS/piranha/pulse
>
> If you need to use scripting with FOS then you may need the patched version
> that Sebastion Bonnet put out.
>
>
> 2009/3/9 Mike Kemelmakher <mike at ubxess.com>
>
>> Hi Sean,
>> You can try to configure FOS  ( fail-over service)  mode which is
>> supported by piranha as well.
>>
>> Regards,
>> -Mike
>>
>> 2009/3/9 Sean Drill <sean.drill at staff.westnet.com.au>
>>
>>>    Hi there
>>>
>>> I have been having some issues implementing a new load balancing system,
>>> and was hoping someone could over some advice.
>>>
>>> Our current configuration is configured using ldirectord. The active node
>>> hosts all the virtual servers. Each virtual server will have an active real
>>> server, and a backup real server. All the traffic will be directed to the
>>> active real server, unless that server becomes unreachable, at which point
>>> all traffic will be directed to the backup server. In other words, a
>>> traditional real/fallback system.
>>>
>>> I am however only able to get piranha/lvs to do load sharing. In this
>>> case as long as both servers are set to UP, then traffic will be balanced
>>> between all servers (determined by load balancing scheme and weighting.)
>>> What I am attempting to do is create a virtual server in LVS, which has two
>>> active REAL servers, however direct traffic only to one of them, unless
>>> otherwise directed or if the active member fail, then direct traffic to the
>>> backup. I am basically trying to replicate the ldirectord/heartbeat
>>> system with piranha/lvs/pulse.
>>>
>>> Any directions which can be offered would be great appreciated.
>>> Regards,
>>> Sean
>>>
>>> Regards,
>>> Sean
>>> ____________________________________
>>>
>>> Sean Drill
>>> *Network Administrator - Network Services*
>>> [image: Westnet] <http://www.westnet.com.au/>
>>> *Westnet - Voted Number 1 ISP in Customer Satisfaction six years running
>>> *
>>>
>>> *Phone:* (08) 9218 2600    *Fax:* (08) 9218 2666
>>> Westnet Home <http://www.westnet.com.au/>  |  MyWestnet<http://www.mywestnet.com.au/>
>>> |  Contact Us <http://www.westnet.com.au/contact/>
>>>
>>>
>>>
>>> _______________________________________________
>>> Piranha-list mailing list
>>> Piranha-list at redhat.com
>>> https://www.redhat.com/mailman/listinfo/piranha-list
>>>
>>
>>
>> _______________________________________________
>> Piranha-list mailing list
>> Piranha-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/piranha-list
>>
>
>
>
> --
>
> Life's most urgent question is: what are you doing for others?
>
> -Martin Luther King Jr
>
> _______________________________________________
> Piranha-list mailing list
> Piranha-list at redhat.com
> https://www.redhat.com/mailman/listinfo/piranha-list
>



-- 

Life's most urgent question is: what are you doing for others?

-Martin Luther King Jr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/piranha-list/attachments/20090310/33a8903c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: att3d006.gif
Type: image/gif
Size: 3027 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/piranha-list/attachments/20090310/33a8903c/attachment.gif>


More information about the Piranha-list mailing list