Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2005
    Posts
    598

    Cpanel HA with DRBD

    Hi,

    I would need to setup a pair of Cpanel server with Active/Active HA in Amazon EC2. Has anybody set this up before? Can I use DRBD to achieve this?
    My Web Hosting and Gadgets Blog http://tekkiebao.blogspot.com/

  2. #2
    Join Date
    Jan 2014
    Location
    Fort Lauderdale
    Posts
    360
    The solution to this is complex on a couple of levels. First, everything that is tied to an IP Address and I mean everything would have to be in constant sync but at the same time updating to reflect the second servers IP address. Second the MySQL would probably need to be moved outside of the server to a separate server and have its own HA/Proxy/Cluster Setup. You could look into Galeria+MySQL(MariaDB also) for this part. If you are going for HA, the are a few things you can do to get close - first configure more than one dns and cluster them. thats easy and included with CPanel. Second remote mysql vs built in and configure HA as a referenced above (not as easy but doable. Finally configre a snapshot schedule something like very six hours if your think data might change alot or longer if it wont, then if something goes wrong, you can restore the snapshot to an EC2 in another zone (same region I think). Update your DNS with the new IP and you are golden. You will probably be down for under an hour if you choreograph it ahead of time. Also I oversimplified it to give you a general idea of creating a plan with your infrastructure, but I did not explain pro/con, you would have to research that according to your application.

  3. #3
    Join Date
    Nov 2012
    Location
    Toronto
    Posts
    426
    What is the problem you are trying to solve? Do you just need HA cPanel portal? Do you require the rest to be replicated? What about customer files and databases?

    If you are looking for HA, I would look at other hosting solutions. You can use something from VMWare like Fault Tolerance.
    http://kb.vmware.com/selfservice/mic...rnalId=1013428
    Andrew Wataszko - [email protected]
    Quartet Service Inc
    Cloud Services | Support Services | Technology Management Programs

  4. #4
    This set up should be really easy to set up as it is very well documented by Fedora, RedHat and Centos.

    We have done something similar recently, not with cPanel, but another open source control panel.

    Something like DRBD + corosync + pacemaker and using a cluster aware file system like GFS2 or any of the alternatives depending on your needs should be pretty straight forward to do, even with cPanel. For databases you could use any kind of replication that allows master/master configuration, galera is fine, but I am not sure if it is stable enough yet.

    In our configuration we used DRBD to replicate all partitions we needed to a remote server and rely on pacemaker to control our nodes (ip addresses, services, etc). Proper fencing is a must to avoid split brain situations and corrupted data.


    There are many other ways to achieve what you are looking for, it all depends on your needs, available nodes and knowledge. However, I would avoid at any cost using Amazon for setting up a cluster environment - way too slow and costly.

  5. #5
    Join Date
    May 2008
    Location
    Cusco Perú
    Posts
    548
    Hi.
    Maybe this can help you:

    Assumptions

    First, you must have a working knowledge of the command line, networking, Amazon AWS, and cPanel/WHM/DNSONLY.

    Second, this model will run two dedicated nameservers (cPanel DNSONLY), the node servers will not be running DNS and will be configured in a cluster.

    Third, I won’t be going over the registration process of AWS, you need to already have an active account.

    More info:

    http://blog.cpanel.net/part-1-how-i-...on-amazon-aws/



    http://blog.cpanel.net/part-2-how-i-...on-amazon-aws/


    http://blog.cpanel.net/part-3-how-i-...on-amazon-aws/

  6. #6
    Join Date
    Jan 2010
    Location
    USA
    Posts
    2,148
    Quote Originally Posted by Tomcatf14 View Post
    Hi,

    I would need to setup a pair of Cpanel server with Active/Active HA in Amazon EC2. Has anybody set this up before? Can I use DRBD to achieve this?
    Unfortunately, cPanel is not designed to work with Active/Active HA. Even if you can cobble something together, it is likely that some future cPanel update will break it. Submit a feature request to cPanel about Active/Active HA.
    No Support Linux Hosting Bargain cPanel Hosting Experts Only
    We IGNORE the support questions, and pass the SAVINGS on to YOU!
    We also ignore questions about VPS Hosting

  7. #7
    Join Date
    Nov 2002
    Location
    Portland, Oregon
    Posts
    2,948
    Quote Originally Posted by NoSupportLinuxHostin View Post
    Unfortunately, cPanel is not designed to work with Active/Active HA. Even if you can cobble something together, it is likely that some future cPanel update will break it. Submit a feature request to cPanel about Active/Active HA.
    More now than ever -- I agree.

    However, I was able to get this working back in 2010 - Heartbeat cluster, DRBD as you mentioned, two Debian nodes, and set up cPanel as a VM, using Xen. As cPanel was never designed to be anything but standalone in the first place (outside of DNS clustering) I doubt cPanel would even support it. You would have probably been fine before 11.36, but I feel that running such a setup at this stage could decrease reliability more than improving it.

    Though, when I was running it live ... it worked like a charm.
    | John Edel Jetfire Networks L.L.C. Trusted Hosting Solutions
    | Consistent, Reliable, Stable OpenVZ & KVM Virtual Private Servers
    | SpamWall AV & Full SMTP Filtering
    Now an SSLStore Titanium Partner!

  8. #8
    Join Date
    Oct 2002
    Location
    Vancouver, B.C.
    Posts
    2,656
    We've done it for a client before in an active/backup configuration with dedicated servers. It was a pain to deal with, but worked well enough. The problem was determining what to keep local and what to DRBD, as you can't just DRBD the whole thing.

    I would definitely avoid doing this with Amazon, as there is too much going on their environment and you do not want to be dealing with split-brain issues.

    Running cPanel in a VM and clustering the host will probably be the cleanest approach.

    Another alternative is to forgo DRBD altogether, and just split off the database and have separate cPanel instances talking to it with a load balancer in front of everything.

    One problem you may encounter, regardless of what type of setup you go with, is that even if changes get written out for all your different instances, the configurations may not be reloaded into the actively running processes. You may need to do some custom coding into cPanel's hooks to have it trigger the configuration reloads on other instances as well its own. This is non-trivial, but should not doable with a bit of time spent by someone with a good mix of sysadmin/dev skills.
    ASTUTE HOSTING: Advanced, customized, and scalable solutions with AS54527 Premium Canadian Optimized Network (Level3, PEER1, Shaw, Tinet)
    MicroServers.io: Enterprise Dedicated Hardware with IPMI at VPS-like Prices using AS63213 Affordable Bandwidth (Cogent, HE, Tinet)
    Dedicated Hosting, Colo, Bandwidth, and Fiber out of Vancouver, Seattle, LA, Toronto, NYC, and Miami

Similar Threads

  1. DRBD
    By 3FRSB in forum Web Hosting Lounge
    Replies: 0
    Last Post: 08-29-2013, 05:35 AM
  2. Configuring DRBD and Heartbeat on Cpanel
    By ajos in forum Hosting Software and Control Panels
    Replies: 2
    Last Post: 12-14-2012, 04:02 PM
  3. DRBD and HeartBeat
    By elvis1 in forum VPS Hosting
    Replies: 3
    Last Post: 01-14-2011, 09:37 AM
  4. DRBD vs. VMware for cPanel
    By trustedhosting in forum Hosting Security and Technology
    Replies: 7
    Last Post: 12-20-2010, 02:34 PM
  5. Alternative to DRBD and Heartbeat
    By Crothers in forum Dedicated Server
    Replies: 1
    Last Post: 01-18-2010, 07:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •