Guide to DNS Cluster Configuration

For WHM version 11.38

(Home >> Cluster/Remote Access >> Configure Cluster)

Introduction

A DNS cluster is a number of nameservers that share records.

Clustering allows you to physically separate your nameservers so that in the event of, for instance, a power outage, you still have DNS functionality. This way, visitors can reach websites on your server more quickly after the web server comes back online. (The cPanel DNS cluster feature only provides redundancy for DNS. It does not place Apache or any other services in a cluster configuration.)

To optimally configure your DNS cluster, you will need 2 spare servers, both preferably running cPanel DNSONLY. You will also need at least 1 web server with cPanel & WHM installed.

  • cPanel DNSONLY is software that allows you to run a dedicated physical nameserver. It should only be installed on nameservers with no previous content on them.
  • You can download the cPanel DNSONLY software for free.
  • All machines in the cluster must be running cPanel & WHM or cPanel DNSONLY version 11 or higher. (Some features may not work with older versions of cPanel & WHM.)
  • You may have multiple cPanel DNSONLY servers and multiple cPanel & WHM servers in a cluster.

Enabling DNS clustering on each server

First, you will need to enable DNS clustering via each server's WHM interface:

  1. Navigate to WHM’s Configure Cluster screen.
  2. Select Enable DNS Clustering.
  3. Click Change.
  4. Click Return to Cluster Status.

Image of 'Enable DNS Clustering' box.
Selecting 'Enable DNS Clustering' to turn on clustering.

DNS clustering is now enabled. Next, specify which server(s) you wish to cluster, or share DNS information with.

  • You will need to sync each web server to its DNS servers.
  • You do not need to link dedicated DNS servers to each other, or link dedicated web servers to each other.
  • You should not set a DNS server to sync data back to a web server, as this will put extraneous data on the web server.

Global cluster options

This section allows you to specify the number of dnsadmin commands that are allowed to fail before WHM disables a member of your cluster. Disabling unresponsive cluster members can improve server performance.

  1. Select an option:
    • 10 is the default. We recommend this setting.
    • To enter a different failure threshold, select the second button and enter the number of failed commands you wish to allow.
    • If you wish for all of the members of your cluster to remain online at all times, select Keep all cluster members online at all times.
  2. If you want WHM to notify you when it disables an unresponsive member, select Get a notification when WHM disables an unresponsive cluster member.
    • WHM will send the notifications during DNS queue processing.
  3. Click Change.

Image of Global Cluster Options box.
Disabling unresponsive cluster members.

About your DNS cluster configuration

Before you set up your DNS cluster, consider how you will structure it.

Directly linking the web server to the nameservers

Creating a cluster setup with direct links between servers can decrease CPU load, improving the performance of your servers. The more steps, or "hops," between a web server and a nameserver, the slower the servers' performance will be.

If at all possible, you should link your web server directly to the DNS servers, as shown in the diagram below. This is the ideal DNS setup.

A direct link is optimal.
Figure 1. A direct link between the web server and 2 nameservers is optimal.

In this example, webserver.example.com sends DNS information directly to ns1.example.com and ns2.example.com. You can create this setup by using the WHM Configure Cluster feature to link the web server directly to each nameserver (see the instructions below).

Using the primary nameserver as an intermediary

If necessary, you may place the primary nameserver between the web server and the secondary nameserver. For each intermediate server that you add, the data transfer time will be 3 times slower than for a direct link.

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

You can create this configuration by setting the web server to sync the primary nameserver, and setting the primary nameserver to sync the secondary nameserver (see the instructions below).

Using multiple intermediary nameservers

The least optimal configuration uses multiple “hops,” or steps, between the web server and nameservers. This increases processor load on the servers, as the nameserver software works to update the DNS information on each hop, slowing response time.

Multiple hops slows performance.
Figure 3. Configuring multiple hops between a web server and nameserver slows performance.

In this example, for web1.example.com to communicate with ns2.example.com, the information must pass through 2 intermediary servers, increasing the overall processing load. We do not recommend this method.

Setting up the cluster from the web server

On your web server's WHM interface:

  1. Navigate to the Configure Cluster screen.
  2. Under Servers in your DNS Cluster, locate the Add a new server to the cluster box.

    Image of the 'Add a new server to the cluster' box.

  3. Select the server type from the drop-down menu.
  4. Click Configure. WHM will display the cPanel DNS Remote Configuration screen.
  5. Next to Remote cPanel & WHM DNS service, type the hostname or IP address of the nameserver you wish to link to.
  6. Next to Remote server username, type the WHM username for the nameserver (either reseller or root).
  7. Under Remote server access hash, enter the nameserver's remote access key.
    • You can generate and retrieve a key using the nameserver's WHM interface. Log into WHM on the nameserver, and navigate to Manage SSH Keys. Once the key appears, cut and paste it into the Remote server access hash box.

      Image of the 'cPanel DNS Remote Configuration' screen.

DNS Clustering with SoftLayer and VPS.NET

cPanel & WHM users can use the SoftLayer and VPS.NET hosted DNS systems within the WHM interface. To enable DNS clustering with SoftLayer or VPS.NET, you must obtain an API username and key from SoftLayer or VPS.net, respectively. Once you have done so, follow these steps:

  1. Login to WHM.
  2. Select Cluster/Remote Access.
  3. Select Configure Cluster.
  4. In the Backend Type: menu, choose SoftLayer or VPS.NET
  5. Click Configure.

For more information, please visit the cPanel & WHM Marketing Page

Setting up a reverse trust relationship

  1. Select Setup Reverse Trust Relationship if you want WHM to automatically configure the cluster on the remote server.
    • If you select this option, you will not need to log into the WHM Configure Cluster screen on the remote server. However, you may do so if you wish to modify the remote server's cluster configuration.
    • Selecting this option will set the remote server's DNS role to Standalone.
  2. Select Debug mode if you want WHM to record DNS clustering transactions in the /usr/local/cpanel/logs/error_log file.

Specifying the web server's DNS role

Next, you must specify that you wish for this server to synchronize changes, or to write DNS data onto the nameservers in the cluster.

  1. Next to DNS role, select Synchronize. This will cause the web server to send DNS data to the nameserver.
  2. Click Submit.

The cluster is now set up. When you return to the WHM Configure Cluster screen, the remote server will be listed in the Servers in your DNS Cluster table.

Important notes about setting up the DNS cluster

  • We do not recommend setting up the nameserver to synchronize data to a web server; this will create extraneous zones on the web server. (This means that you do not need to log into WHM on the nameserver and set the web server's DNS role to Synchronize changes).
  • You do not need to link dedicated nameservers to each other.
  • A cPanel DNSONLY server should almost never be set to Synchronize changes to a web server. The web server should always be set to synchronize to the DNSONLY server(s), and the DNSONLY server(s) should always be set as Standalone.

Topic revision: r30 - 12 Feb 2013 - 20:44:56 - Main.LaurenceSimon