Cluster IP Address in HA Environment CentOS (5.x)

user204252 asked:

I am in the process of installing High Availability CentOS (5.x) setup with Fail-over capacity, I have 2 identical XEN VPS’s in two different locations, every VPS has a private IP and a public IP, I am using the private IP on each node for the disk replica DRBD and both nodes are connected using IPSec tunnel at the private level, right now I am thinking of using STONITH as fencing mechanism along Pacemaker and Corosync for clustering but I am confused of the whole idea of the cluster IP (Floating Address) and what should I exactly put as the domain NS servers at the domain level, my setup has 2 nodes only with 2 dedicated DNS servers and I know that the floating IP shouldn’t belong to any of the node in cluster (as far as I know) so how can this lonely IP Address can be aware of those two nodes? any logical hints will be great!

My answer:


With the two machines in different datcenters? You can’t. This scenario assumes that both machines in the cluster are on the same subnet; the VIP is also in that subnet.

To do what I think you want to do, you would need an anycast IP address. Then you’d still have to run your own AS so you could add and withdraw routes as the machines go online and offline. This is at least a six digit investment in hardware, infrastructure and quite possibly an admin to babysit it all.

Not what you had in mind, eh? Geographical redundancy is not easy nor cheap.

The minimum I’d do here, since I would guess you are on a tight budget of no more than three or four digits, is to forget the VIP and write a custom fence that adds and withdraws A records from the DNS when the machines go online or offline, and host your DNS somewhere that has solved all these problems already (e.g. Amazon Route 53). You’ll also have to STONITH, (and write custom code for that too) but withdrawing the DNS record ensures that visitors aren’t directed to the dead node.

Later, you should take a few hours and do some research to decide whether this is the right way to scale your application at all. If it’s a web site, it might not be.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.