The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Master-Slave Clustering in crayon

Discussion in 'Bind / DNS / Nameserver Issues' started by gwc_wd, Jan 2, 2015.

  1. gwc_wd

    gwc_wd Member

    Joined:
    Oct 24, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I've read the forums and Google searches extensively and while I think I have some sense of implementing clustering between two WHM servers, I'm not really confident about it. The detailed instructions that have been posted here do take for granted what some might consider common sense understanding which I fear I am lacking. I'm hoping someone will help the slow kid and write it out in crayon.

    Here's what I have:

    2 distinct VPS servers running WHM/CPanel. Both have been operating independently of the other, so each has it's own name servers and other than occasional tweaking of MX records, I have been happily served by the automated DNS functioning that happens when a new domain is added.

    Without addressing the additional wrinkle that my recent Plesk based server introduces, I would love it if I can make the two existing WHM based servers act as a cluster with the DNS of one being the backup of the other.

    Both servers host web sites and CPanel users, and each has its own set of domains served by its own name servers. If not clear, the name servers are on the same physical server as the web sites, and while ns1 and ns2 of each have different IP addresses (so a total of 4 IPs, 2 per machine), they are on the same physical machine (VPS). Meaning ns1.machine1 and ns2.machine1 are on the same machine, and ns1.machine2, ns2.machine2 are also both on a single machine. 4 ns, 4 IPs, 2 machines.

    I am confused by the discussions of adding the servers to a cluster.

    Just using the WHM clustering feature, can the existing servers be added to a newly created cluster and all the existing DNS entries will be 1) preserved, and 2) replicated to both servers?

    The examples of adding a server show a standard domain name as in example.com. When a server hosts multiple domains, how does one determine which domain to add? Is it the base domain of the name servers?

    So if I have ns1.example.com and ns2.example.com on one machine and ns1.otherdomain.com and ns2.otherdoman.com, I would add otherdomain.com to a cluster on example.com?

    What do I do about the otherdomain name servers? leave them in place? Or do I get rid of the 4 name servers and change the entries on example.com to ns1.example.com pointing to its own IP and ns2.example.com pointing to the IP of otherdomain.com (with a new A record for ns2)?

    This must all be obvious to people, but just seeing me write it out you can see that I'm not picking it up clearly.

    I'm also concerned by the distinction between synchronize and standalone. Obviously the goal is to have all of the DNS records exist on each server so that if one fails the other has a complete set of records for both sets of web sites. But the standalone role means no changes made on that server are propagated to the other server -- so how is that creating the required redundancy? Yet several posts in this forum indicate it is a bad idea to have the synchronize role on both servers as it may lead to DNS record conflicts.

    The implication is that the server with the role of standalone will no longer write DNS records to its own server but will automatically write them to whichever is designated ns1. Then that ns1 server with the synchronize role will write all new or changed records to the standalone server ns2. Is that right? And does that mean that I initially have to take all of the existing records from standalone-role-machine2 and add them in to the ns1 synchronize-role-machine1? Or will that happen automatically through the magic of WHM?

    What is the worst case if I get it wrong? Can I quickly revert back to the existing configuration by deactivating clustering without losing all my existing records?

    All of this only arose in my mind because I recently rented another VPS purely to provide email for the domains on my WHM hosted machines. Expanding my system into a different country to spread risk, I went with a completely different provider that uses Plesk. In the Plesk interface there is a fairly prominent option to set the DNS server to Slave mode. Which led me to investigate the whole issue of DNS fallback servers. For now if I can find some comfort level in trying to get it working just between my two WHM environments, I'd be very grateful.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, you can enable clustering and set the roles on both servers to "Synchronize Changes". This will automatically sync the zones from each server to one another (both existing and new zones).

    You should use the hostname or IP address of the server you are adding to the cluster.

    No, you would add the hostname or IP address of the other server when setting up the cluster in WHM on each server.

    The use of "Standalone" as a role is designed for customers that utilize cPanel DNS-Only to exclusively handle DNS zones. Thus, there's no need to synchronize the zones from the DNS-Only machine back to the hosting machine. In fact, it's actually advised to setup a DNS-Only server instead of syncing two hosting servers to each other for better performance.

    You can disable clustering without losing any DNS zones.

    Thank you.
     
  3. gwc_wd

    gwc_wd Member

    Joined:
    Oct 24, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Actually, Thank You!

    Your explanations were very clear and helpful.
     
Loading...

Share This Page