cPanel & WHM Version 114 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Built-in load balancing, replication, high availability

alex shared this idea 10 years ago
In Progress

It would be nice to have support for setting up various kinds of load balancing and replication.

Best Answer
photo

Hey all! This isn't yet defined on the roadmap, but we're definitely talking about the best ways to implement this. If we had our druthers we would already be working on it! The good news is that we're slowing removing the giant impediments that are core to the product that have been preventing us from working on this already. As soon as there's an update, I'll make sure to share!

Replies (17)

photo
3

At least 1 method of load balancing/high availability will be very nice, please consider to add it..

photo
2

Hi If the project leadares like zen load balancer we can help in the integration with the cpanel.


Regards

Zen load balance developer member

photo
1

We like the idea of having a high availabiliy NAS shared between two servers, however this would mean that cPanel would have to accept to have the same account on two servers both using the same DNS cluster and allowing for all functions to be compatible with this configuration.

photo
1

I would love to be able to have multiple cpanel VMs behind a load balancing device such as Netscaler to build out a farm.

photo
3

I Believe this feature would be a gamechanger for cPanel as we know it.

Some things to consider though.

If this feature comes to cPanel, i would love to see an option where cPanel would create a full-scale "webserver-cluster" of the available webservers, where storage and mysql would be remotely accessed.

We're in deep need of this before we can go on and use cPanel for our environment!

photo
2

I've been thinking about this a bit more.


This feature sound's very complicated and I think there are two parts or steps to make this become true.


PART 1


The first is to give sysadmins the ability to set up thier own high availability system :


cPanel already supports DNS clustering and an external mysql server. An e-mail only custer would also be handy, but there is already a feature for this.


We could mount a high availability NAS or SAN storage for homedirs and set up IP loadbalancers. IP loadbalancers can be set to check availibility and to perform sticky round'n robin (for sessions) etc.


The first thing we would need is for cPanel to allow to create an account with a domain that already exists in the DNS cluster without changing the account's IP and without changing the existing files in the homedir as the users files will already exist on the NAS or SAN storage.


We would also need cPanel to make sure that both servers play well together while sharing the same homedir over our NAS/SAN mounted drive space.


PART 2


The second part, which would come after the first part, would be to provide the technology give high availibility out of the box.


There are some systems that already do this, like for instance HybridCluster. To achieve this, they set DNS ttl to the lowest value possible, and automaticaly change an account's IP to point it to the other server when one server goes down. They use ZFS to keep files in sync, but a NAS or SAN based system would be just as good for our usage. Some form of heartbeat would need to be used to automaticaly change the DNS settings for an account to point to the new IP.


Another path instead of NAS or SAN could be to install a proxy on all servers, and sync homedir files with rsync in deamon mode for instance. When a site is moved automaticaly to the other server the proxy DNS would be changed to point to the second server that would proxy back to the first server until the files were in sync then the proxy would be inversed to that people who have a dns cache on their router are proxied to the second server. If a server stops responding, all sites are moved to a working server automaticaly and admins could easily move a site from one server to the other without any downtime.


All of this would need Part 1 to be working so in our view, this feature request could be split into two features, one making cPanel compatible with this type of setup while requiring sysadmins use external storage for homedirs and their own ip balancers, and the second making cPanel able to manage high availabily all on it's own, allowing WHM root users to simply add a new server to a cluster and let cPanel manage the rest.

photo
2

yes... please for gods sake add that... we host sites that have wordpress and they are sites that are 30k to 45k posts... we have a heck of a time with this. Constantly changing infrastructure...

photo
1

If a single site gives you a headache that way, I think it's time for that customer to use something different then a shared hosting facility as in a cPanel server.

For me, customers that are that big I force to a VPS system on AWS, at least for their website. If the rest is within certain limits that part can still stay on the cPanel servers.


Also if changing infrastructure is a big issue, build on AWS. You can scale your machines up with just a few clicks. Although be prepared to read up on the somewhat complex cost structure and ways to keep track on the overal costs.

photo
1

I find it difficult to believe that you would have any issues with that. Naturally it all depends on how well your server is configured and how you've optimised it. And of course what the hardware specifications are. Many variables come in play.

I host about 90 WordPress sites, big ones, on one of my cPanel servers with no issues. They are high traffic ones, too.

photo
1

If you need help, post your case and i try to help you. But cPanel it's to help to sell or resell, not for hosting big websites. Do you know an medium-big enterprise, not in hosting bussiness, that use cPanel?

photo
1

we hosts 1000s of them... that are 30k to 45k posts typically in size. Around 250MB to 650MB databases.

photo
1

it should be nice if cpanel support apache cluster with load balancing , and exim cluster like it do with dns cluster .


it is important to give customer high availability also in shared hosting with many account

photo
2

the load balancing feature would be nice from an upgrade perspective. say you want to upgrade wordpress (as an example) on one server and see if that causes any issues with clients. if it does you can easily move them back to the pre-upgraded system.


also - if one server is under a DOS attack - you can move sites to the other server. (yes?)

photo
1

This will not help you in case of a DOS attack, only in case the attack is focused on a specific IP and the attacker is dumb enough not to check if the domain is moved. If you change DNS records to a new server the new server will die. If you do load balancing, they will both die. DOS is whole different ballgame. And should also not be fixed on an application/service level.

photo
1

This could be a useful feature for a number of reasons.


1. Eventually, a successful site will start exhausting server resources, even on a high end server.

2. Sometimes, a site might be featured in news or someplace, and there will be a spike in traffic.


Here is one possible idea to set this up:


1. create the concept of a 'cluster' in cPanel

2. allow users to add/remove servers to/from cluster


3. automatically configure MySQL replication among servers in the cluster

4. automatically configure GFS file system (or something else) for user home folders

5. automatically add multiple A/AAAA records to dns zones (this will load-balance requests between servers); maybe allow load balancer IP to be configured?

6. automatically configure dns zones on all servers

7. automatically configure email servers

8. etc..


The point of this setup is:


1. load balancing - if a site has a huge traffic spike, the system will be able to handle the load

2. high availability - if a server goes down, various daemons' configuration allows everything to keep working as if nothing has happened

photo
2

This feature is really urgent for cpanel server administrator, and i think it should have high priority.


What can be done manually is to rsync files thru cronjob. But what about databases and ftp accounts and the protect dir. this really needs cpanel developers to be able to do it


Regards

photo
1

We will soon be creating a CEPH custer in order to test KuberDock and it would be nice if we could also use it for user's home dirs.


I'm still not sure that it should be up to cPanel to deal with the file sync. Well at least for the first versions they could maybe give guides and focus on making sure users details outside their homedir and apache configs are in sync.

photo
1

Could using Amazon EFS (https://aws.amazon.com/efs/details/) with the upcomming remote MySQL service (Without root access) be able to do the job?


There would be some tweaking at the level of applying change and restarting apache that would need to be configured, plus some alternatives to quota's.


but it may be possible

photo
2

We use multiple dedicated cPanel servers around the globe. As a server administrator this would be the best option I can hope for in cPanel. With this option available within cPanel we won't need to make complicated settings and look to other software to provide HA, LoadBalancing and Replication to our customers.


@benny could you please update us all about the plan to include this feature in near future soon?


--

Sam

photo
2

Hey all! This isn't yet defined on the roadmap, but we're definitely talking about the best ways to implement this. If we had our druthers we would already be working on it! The good news is that we're slowing removing the giant impediments that are core to the product that have been preventing us from working on this already. As soon as there's an update, I'll make sure to share!

photo
1

It would be nice not to have to pay a third party for failover, please implement this.

photo
1

Which third party allows this ? Do you mean using VMWare ? Or is there another soluton out there ?

photo
1

Hey guys, let's take the third party discussion to the forums to to a private email conversation. If you'd like me to pass each other your email addresses, just let me know.

photo
3

We have begun heavy research phases of High Availability for cPanel. We have a forecasted roadmap for HA and we will continue adding additional information to it as we flesh out the project further.

photo
2

Good news folks!

We have updated the roadmap with more information about the direction we're heading. As always, feedback is welcome.

https://docs.cpanel.net/knowledge-base/roadmaps/cpanel-cloud-edition-roadmap/

Dustin Scherer (he/him) | Product Owner | @dustinscherer

Replies have been locked on this page!