cPanel

Guide to DNS Cluster Configurations


Overview

A DNS cluster is a group of nameservers that share records with each other. This allows you to physically separate nameservers that handle the DNS requests from your cPanel & WHM servers.

  • WHM’s DNS Cluster feature (WHM >> Home >> Clusters >> DNS Cluster) only provides redundancy for DNS. It does not add Apache or any other services to a DNS cluster configuration.

  • cPanel DNSOnly allows you to run a dedicated physical nameserver. It only replicates DNS zones to your other servers. For more information, read our cPanel DNSOnly documentation.

DNS cluster requirements

To configure your DNS cluster, you must meet the following minimum requirements:

  • Clusters must include at least two servers.
  • You must have at least one cPanel & WHM server with cPanel & WHM installed. A DNS cluster that includes multiple cPanel DNSOnly™ servers and cPanel & WHM servers is also acceptable.
  • All machines in the DNS cluster must have cPanel & WHM or cPanel DNSOnly version 11 or higher installed. Some features may not work with older versions of cPanel & WHM.

DNS cluster structures

Before you set up your DNS cluster, consider which structure will be the most efficient. The way in which you link each server determines the speed at which your DNS requests resolve.

Important:
  • We recommend that you do not set up the nameserver to synchronize data to a cPanel & WHM server, because this creates extraneous zones on the cPanel & WHM server. This means that you do not need to log in to WHM on the nameserver and set the cPanel & WHM server’s Synchronize Changes DNS role. For more information about DNS server roles, read our DNS Cluster documentation.

  • If you set a server in a DNS cluster to the Write-only role, WHM will not check whether a DNS zone exists before you create an account. Because of this, it is possible to create the same domain name on two or more of these servers. If this occurs, the servers compete for updates to that domain.

  • Don’t link dedicated nameservers to each other, or link dedicated cPanel & WHM servers to each other.

Your servers function more slowly if multiple steps exist between a cPanel & WHM server and a nameserver. To improve the performance of your servers, link your cPanel & WHM server directly to the DNS servers. This eliminates the steps that each request must perform, and your DNS requests will resolve more quickly.

A direct link between the web server and each of two nameservers is optimal.

Note:

In this example, webserver.example.com sends DNS information directly to ns1.example.com and ns2.example.com.

To create this configuration, you will need one cPanel & WHM server and one or more nameservers.

Create DNS cluster with direct links

Note:

When you add the new nameserver to the cluster, you will need to log in to the nameserver and obtain an API token from that server.

To set up a DNS cluster with direct links, perform the following steps:

  1. Install cPanel & WHM on the server that you will use to host your websites.

  2. Install cPanel DNSOnly on each of the servers that you will use as nameservers.

  3. Log in to the cPanel & WHM server and navigate to WHM’s DNS Cluster interface (WHM >> Home >> Clusters >> DNS Cluster).

  4. If you have not already enabled DNS clustering on this server, perform the following steps to enable it:

    1. Click Enable DNS Clustering.
    2. Click Change.
    3. Click Return to Cluster Status to return to the DNS Cluster interface.
  5. Add each new nameserver to the cluster. To do this, perform the steps in our DNS Cluster documentation.

  6. Use WHM’s Synchronize DNS Records interface (WHM >> Home >> DNS Functions >> Synchronize DNS Records) to manually synchronize each new nameserver with the DNS cluster.

  7. To confirm that each nameserver exists in the cluster, perform the following steps:

    1. Log in to the main cPanel & WHM server via SSH.
    2. Run the following command, where example.com represents the nameserver name and ip represents the nameserver’s IP address:
      dig +short example.com @ip

Use the primary nameserver as an intermediary

If necessary, place the primary nameserver between the cPanel & WHM server and the secondary nameserver. For each intermediate server that you add, data will transfer three times slower than for a direct link.

An intermediate nameserver between the web server and secondary nameserver is acceptable.

To create this configuration, you will need one cPanel & WHM server and at least two nameservers.

Create DNS cluster with primary nameserver as intermediary

Note:

When you add a new nameserver to the cluster, you will need to log in to that nameserver and obtain an API token from that server.

To set up a DNS cluster with the primary nameserver as an intermediary, perform the following steps:

  1. Install cPanel & WHM on the server that you will use to host your websites.

  2. Install cPanel DNSOnly on the servers that you will use as nameservers.

  3. Log in to the cPanel & WHM server and navigate to WHM’s DNS Cluster interface (WHM >> Home >> Clusters >> DNS Cluster).

  4. If you have not already enabled DNS clustering on this server, perform the following steps to enable it:

    1. Click Enable DNS Clustering.
    2. Click Change.
    3. Click Return to Cluster Status to return to the DNS Cluster interface.
  5. Add the first nameserver to the cluster. To do this, perform the steps in our DNS Cluster documentation.

  6. Use WHM’s Synchronize DNS Records interface (WHM >> Home >> DNS Functions >> Synchronize DNS Records) to manually synchronize the new nameserver with the DNS cluster.

  7. Log in to the nameserver that you just added, and then navigate to WHM’s DNS Cluster interface (WHM >> Home >> Clusters >> DNS Cluster).

  8. If you have not already enabled DNS clustering on this server on the nameserver, perform the following steps to enable it:

    1. Click Enable DNS Clustering.
    2. Click Change.
    3. Click Return to Cluster Status to return to the DNS Cluster interface.
  9. Add the second nameserver to the cluster. To do this, perform the steps in our DNS Cluster documentation.

  10. Use WHM’s Synchronize DNS Records interface (WHM >> Home >> DNS Functions >> Synchronize DNS Records) to manually synchronize the second nameserver with the DNS cluster.

  11. To confirm that each nameserver exists in the cluster, perform the following steps:

    1. Log in to the main cPanel & WHM server via SSH.
    2. Run the following command, where example.com represents the nameserver name and ip represents the nameserver’s IP address:
      dig +short example.com @ip

Use multiple intermediary nameservers

Warning:

We do not recommend this method. It can significantly reduce performance.

This configuration uses multiple steps between the cPanel & WHM server and nameservers. In the example below, for web1.example.com to communicate with ns2.example.com, the information must pass through two intermediary servers. This increases the processor load on the servers because the nameserver software updates the DNS information on each step. This configuration slows the servers’ response time considerably.

If you configure multiple steps between a web server and nameserver, the servers’ performance slows.

To create this configuration, you will need at least two cPanel & WHM servers and at least two nameservers.

Create DNS cluster with multiple intermediary nameservers

Note:

When you add a server to the cluster, you will need to log in to that server to obtain your API token.

To set up a DNS cluster with multiple intermediary nameservers, perform the following steps:

  1. Install cPanel & WHM on the two servers that you will use to host your websites.

  2. Install cPanel DNSOnly on the two servers that you will use as nameservers.

  3. Log in to the first cPanel & WHM server and navigate to WHM’s DNS Cluster interface (WHM >> Home >> Clusters >> DNS Cluster).

  4. If you have not already enabled DNS clustering on this server, perform the following steps to enable it:

    1. Click Enable DNS Clustering.
    2. Click Change.
    3. Click Return to Cluster Status to return to the DNS Cluster interface.
  5. Add the second cPanel & WHM server to the cluster. To do this, perform the steps in our DNS Cluster documentation.

  6. Use WHM’s Synchronize DNS Records interface (WHM >> Home >> DNS Functions >> Synchronize DNS Records) to manually synchronize the second cPanel & WHM server with the DNS cluster.

  7. Log in to the second cPanel & WHM server, and then navigate to WHM’s DNS Cluster interface (WHM >> Home >> Clusters >> DNS Cluster).

  8. If you have not already enabled DNS clustering on this server, perform the following steps to enable it:

    1. Click Enable DNS Clustering.
    2. Click Change.
    3. Click Return to Cluster Status to return to the DNS Cluster interface.
  9. Add the first nameserver to the cluster. To do this, perform the steps in our DNS Cluster documentation.

  10. Use WHM’s Synchronize DNS Records interface (WHM >> Home >> DNS Functions >> Synchronize DNS Records) to manually synchronize the first nameserver with the DNS cluster.

  11. Log in to the first nameserver, and then navigate to WHM’s DNS Cluster interface (WHM >> Home >> Clusters >> DNS Cluster).

  12. If you have not already enabled DNS clustering on this server, perform the following steps to enable it:

    1. Click Enable DNS Clustering.
    2. Click Change.
    3. Click Return to Cluster Status to return to the DNS Cluster interface.
  13. Add the second nameserver to the cluster. To do this, perform the steps in our DNS Cluster documentation.

  14. Use WHM’s Synchronize DNS Records interface (WHM >> Home >> DNS Functions >> Synchronize DNS Records) to manually synchronize the second nameserver with the DNS cluster.

  15. To confirm that each server exists in the cluster, perform the following steps:

    1. Log in to the main cPanel & WHM server via SSH.
    2. Run the following command, where example.com represents the nameserver name and ip represents the nameserver’s IP address:
      dig +short example.com @ip

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close