Failover/Load balancer for WHM/cPanel

5,304

Solution 1

In general, if you want to do High Availability, Control Panels are going to either massively screw things over or complicate things to the point where things are so fragile that a single wrong step will cause breakage. You also run into the risk of licensing not working, although I'm not familiar enough with WHM/CPanel to say for sure if that will be an issue.

The only reliable way I've found of doing High Availability when control panels are involved is to virtualise the host with the control panel, and then rely on whatever virtualisation tech you use to handle the failover. Then as far as the control panel is concerned, it's on one host and it's happy.

In my case, I've used Xen with a DRBD backend. I have a Xen DomU running on each server with it's own copy of DirectAdmin in this case, and heartbeat manages the failover of the DomU between the two. You do the same with other Virtualisation technologies.

Solution 2

If the files do not change frequently, you can use rsync or Unison. You can also use replication at the level of block devices(DRBD) or cluster file system(GlusterFS,GFS).

To synchronize the database, you can use replication.

Share:
5,304

Related videos on Youtube

recluze
Author by

recluze

Updated on September 17, 2022

Comments

  • recluze
    recluze over 1 year

    I have a simple question for which I have not been able to find a simple answer. Here's the scenario:

    Server 1: WHM/cPanel with multiple accounts/dbs

    Server 2: WHM/cPanel with multiple accounts/dbs

    Server 3: Heartbeat for Server 1. (Wwitches the routes to Server 2 in case Server 1 is unavailable.)

    Question: How do I synchronize Server 1 and Server 2? I can sync the DNS settings using the cluster features but what about the files/dbs? I'm prepared to get my hands wet with some coding but I have no idea how to go about this.

    Regards, Nauman.

  • Niall Donegan
    Niall Donegan over 9 years
    Think of DRBD as the poor man's SAN. If you have two physical boxes, you're likely to run into licensing issues with most of the commercial control panels if running on multiple boxes. By putting it on a virtual machines, you can bounce that virtual machine between physical hosts.