HA clustering on FreeBSD

Hi,

I'm looking for a failover solution that monitors health and allows me to call an external script.
I basically want something that regularly monitors state of the master and if it sees that master is down it will take over.

I have hard time to find such solution for FreeBSD.
 
Yest I did.

The HAST has no use for me here (this is to implement HA for MooseFS master, so no need to share disks), as for CARP the nodes would be in different subnets, and I don't (and can't) set them up to share virtual IP (though switching them through DNS appears to work fine).

Unless I misunderstand something CARP won't work in my scenario.

uCARP could possibly work, but I can't use multicast (it is in AWS which apparently they don't support it), unless there's a way to make it work over unicast.

Are there any other solutions?
 
I think you misunderstood CARP.
CARP is the way to use one virtual IP, which can be switched from a master to a slave.

Regards
Markus
 
It depends what you mean as "take over". Start some services? Maybe some simple script like the following pseudocode for the http service may be enough?
Code:
while true {
   fetch http://otherserver/ || service onestart myservice
   sleep(1000)
}

I would also investigate, if carp(4) may be used over the IP tunnel like gif(4) or any other VPN solution. Then you can use the devd(8) notification to do your take over, for example start some services, change DNS settings, propagate something via BGP etc.
 
storvi_net said:
I think you misunderstood CARP.
CARP is the way to use one virtual IP, which can be switched from a master to a slave.

Markus, unfortunately in my case CARP won't work. The availability zones in AWS are almost (and I'm actually certain it is implemented this way) different data centers in the same region. So nodes in two different AZs will have two different subnets, so there is no easy way to share an IP. uCARP appears to be able to work with this limitation, but it requires routable multicast which is another thing that AWS does not provide.
To perform failover I'm planning to use DNS, it looks like MFS is fine with it.

ondra_knezour said:
It depends what you mean as "take over". Start some services? Maybe some simple script like the following pseudocode for the http service may be enough?
Code:
while true {
   fetch http://otherserver/ || service onestart myservice
   sleep(1000)
}

I would also investigate, if carp(4) may be used over the IP tunnel like gif(4) or any other VPN solution. Then you can use the devd(8) notification to do your take over, for example start some services, change DNS settings, propagate something via BGP etc.

I'll try to make heartbeat port work, and if I fail there then either implement my own solution (I'm thinking of election on zookeeper cluster).

BTW did anyone was successful in making corosync work on FreeBSD?
 
@takeda,

Your only solutions are HAST with uCARP/CARP and/or limited Heartbeat.

There is no 'cluster software' (like PowerHA/Veritas/Serviceguard/...) for FreeBSD.
 
Last edited by a moderator:
Last time I tried corosync it used about 100+ MB for each node (at Linux), can not recommend it.

Thanks, this is a really memory sucker.
I still cherish the time we use memory byte by byte.:)
As I know, a lot of clusters used in enterprise applications are using zookeeper now.
 
Back
Top