My attempts in realizing the setup in the question didnt produce any results over 3 full days' of research and trying. The HA services necessary are Apache which serves numerous virtual hosts each from its own user account, MySQL which serves in the same fashion, and any files which may be uploaded from Apache to these user account's web roots.

I have 2 dedicated servers, one Failover IP which can be used through a web api to point to either server, 2 additional dedicated IPs for 2 servers. I am not able to use Multicast.

I tried with many different stacks, ranging from RedHat's own Cluster packages to various Pacemaker setups, in the closest attempt I was able to have Pacemaker see both nodes as online, whereas in each machine cman wasn't able to see the other node.

Is it possible to set up a CentOS HA cluster with the resources mentioned?

  • HA cluster of what? What are you trying to make highly-available? – ewwhite Feb 22 '16 at 22:17
  • apache, mysql. and any file these may create - files uploaded by apache etc. – unity100 Feb 22 '16 at 22:18
  • Some sort of fencing is mandatory. You forgot to mention who the server provider is. – Michael Hampton Feb 22 '16 at 23:56
  • servers are ordinary boxes at Hetzner datacenter. Fencing i am planning to do through a custom script as fencing device, cutting access to services on a node which fails any service, and switching the failover ip to the other node. – unity100 Feb 23 '16 at 1:25
  • It is possible, it might not be easy. Some form of shared or replicated storage is required. If not a separate storage array perhaps CLVM on top of DRBD. There should be multiple, independent fence methods, if possible Two nodes are a special case in general, and historically were not documented well. You will need to test extensively including failure modes. – John Mahowald Feb 23 '16 at 4:02

First, remember that your setup will have very limited redundancy and very limited functionality.
You can build something like:
1. Cluster network over any kind of VPN-tunnel, with multicast support, for example IPIP. Using encrypted VPN will kill your performance.
2. DRBD disk as a poor man's shared storage, for example, MySQL databases.

And remember, each network outage between your nodes will split-brain your cluster.

Have a look at tools built around Hetzner API:
The last link can serve you as a poor man's fence device.

  • Isn't Hearbeat not actively developed anymore, and instead it has been consolidated into Pacemaker? – unity100 Feb 25 '16 at 0:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.