4 cPanel Server Cluster/Load Balancing ?

Operating System & Version
Centos 7 64 Bit

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,585
2,614
363
cPanel Access Level
Root Administrator
There isn't a supported way to setup a failover environment by default using cPanel and WHM software. It's definitely something we're looking into for the future, but you'd need to explore some custom software solutions in order to set this up. Doing a search on the forums for "failover" or "high availability" may get you some good information as I know this has come up several times before.
 
  • Like
Reactions: WorkinOnIt

gnusys

Well-Known Member
Jan 18, 2013
62
21
58
cPanel Access Level
DataCenter Provider
Why do you need 4 different locations if it is backup/standby? You just need only one right?

You can of course use the 4 locations simultaneously and load balance among them. Of course, the data and databases must be synchronized among the 4 locations
 

Dogus

Member
Nov 14, 2020
8
3
1
Turkey
cPanel Access Level
Root Administrator
Hi, If there is a problem in the server or data center in 1 location, I am looking for such a system to continue working from the other location. And I still haven't figured out how to do it. Do you have a suggestion?
 
  • Like
Reactions: WorkinOnIt

WorkinOnIt

Well-Known Member
Aug 3, 2016
312
54
78
UK
cPanel Access Level
Root Administrator
Hi, If there is a problem in the server or data center in 1 location, I am looking for such a system to continue working from the other location. And I still haven't figured out how to do it. Do you have a suggestion?
Hey @Dogus

The biggest downside to cPanel servers, is that there is no current 'easy' way to replicate data / databases across two different servers.

There are however, some ways to get what you need:

Option 1) Global DNS Load Balancing. If you have a DNS host (e.g. cloudflare or NS1 etc) you could of course put up a load balancer on the domain name which will point traffic immediately to server 2 if server 1 is down. That part is relatively easy and it's not out of this world in terms of cost (see Cloudflare - pricing is from $5 month per domain). The difficult part - again, is to ensure two remote servers can synchronise databases, emails, files, etc. The other downside to this is you are relying on your DNS provider - though rare, they do sometimes have outages (recently Cloudflare experienced downtime)

Option 2) Datacentre Load Balancing: If you use a provider such as Vultr or Digital Ocean (among many others) - they often offer datacentre loadbalancing with floating IPs - meaning you can have two machines that are "mirroring" each other inside a single datacentre - then if one machine goes down / overloads / blows up! in the datacentre, the second machine will continue to work. But the issue with this is it relies on the single datacentre and therefore is vulnerable to localised flooding, earthquakes, etc - rare, but it does happen.

Option 3) HA Web Host: Perhaps the easiest solution is to look for a hosting provider that offers 100% uptime and a guaranteed failover solution. You can look for them and I'm sure you'll find them. It takes all the headache away from you - but of course, you are "in their hands" and have no control (or visibility) over any of the "behind the scenes" working. These types of hosting options are not always the most cost effective either.

One way to achieve the cPanel data sync is via rsync and using an independent database (see Galera DB below) - but unless you have a lot of free time and able to learn this, you may wish to hire someone who can set it up for you.

If you do go down this road, please advise the journey / outcome as there are a lot of people who also want to do this.
https://features.cpanel.net/topic/built-in-load-balancing-replication-high-availability << cPanel disabled comments on this - one of the highest requested features over 8 yesars old (so don't hold you breath of a cPanel solution any time soon ;-).


Other Resources: