DNS cluster best practices for large scale servers

SoftDux

Well-Known Member
May 27, 2006
1,023
5
168
Johannesburg, South Africa
cPanel Access Level
Root Administrator
Hi,

I would like to find out, what do others do with the DNS-cluster setup on a large amount of cPanel servers?

Instead of setting up new name servers for every cPanel server we deploy, we use ns1.mydomain.co.za - ns4.mydomain.co.za. This way, the client only has 4 name servers to work with, and if we move an account from one server to another, it doesn't change.

then, whenever we deploy a new we add 3 other servers to the cluster and set the "DNS Role" to "synchronize" So, in effect, all DNS records are on all servers, but this is causing a negative performance impact.

So, what do others do?
Do you setup 4 DNS-only server, and let the others sync with them, or what would be optimal for such a setup?
 

hostingtech

Member
Feb 4, 2010
21
0
51
Yes this is a Optimal and best choice way of handling DNS for large number of servers.
There are many benefits,
- easy to move around accounts, without changing NS
- one less service to manage on each server
- lesser load on server due to one less service running.

Now on managing the NS , there can be more than one possible scenarios. Either you can have one primary , one secondary ns, where primary is directly clustered with your servers and secondary only gets updates from primary OR more than one primary configured with servers and each getting updates directly from each servers.
How are you running these four NS ? , each getting a direct zone sync/update from the servers ? Or Two primary getting updates and two secondary getting updates from these primaries on periodic bases or real time etc ?
 

SoftDux

Well-Known Member
May 27, 2006
1,023
5
168
Johannesburg, South Africa
cPanel Access Level
Root Administrator
well, currently I have 3 NS servers as part of the main cPanel servers, and 1x DNS-only VPS - which is what U have used to far to see how it all works.

So, if I move the other 3 NS servers to their own DNS-only VPS's (in different data centers as well), then do I still need to have DNS / BIND running on the cPanel servers? And what should the "DNS Roles" be of the cPanel servers, and the DNS-only servers?
 

hostingtech

Member
Feb 4, 2010
21
0
51
So, if I move the other 3 NS servers to their own DNS-only VPS's (in different data centers as well), then do I still need to have DNS / BIND running on the cPanel servers? And what should the "DNS Roles" be of the cPanel servers, and the DNS-only servers?
No if you setup them as DNS-Only then you do not need to run bind/named on the normal Cpanel servers which will be hosting accounts.

For Hosting servers you will need to do following :
- Enabling DNS Clustering from WHM
- Configure cluster with your Primary DNS-Only Nameserver
- In 'DNS Roles' select Synchronize Changes

One DNS-Only servers/vpss you need to do following :
- Enabling DNS Clustering from WHM
- Add your Hosting servers to DNS cluster
- In 'DNS Roles' select 'Standalone'
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
No if you setup them as DNS-Only then you do not need to run bind/named on the normal Cpanel servers which will be hosting accounts.

For Hosting servers you will need to do following :
- Enabling DNS Clustering from WHM
- Configure cluster with your Primary DNS-Only Nameserver
- In 'DNS Roles' select Synchronize Changes

One DNS-Only servers/vpss you need to do following :
- Enabling DNS Clustering from WHM
- Add your Hosting servers to DNS cluster
- In 'DNS Roles' select 'Standalone'
What hostingtech has described is correct. For additional details and setup information I recommend reviewing the following documentation resource: Guide to DNS Cluster Configuration
 

SoftDux

Well-Known Member
May 27, 2006
1,023
5
168
Johannesburg, South Africa
cPanel Access Level
Root Administrator
Just one last question.

I have the 4 node DNS-only cluster setup, as ns1.mydomain - ns4.mydomain. All 4 DNS nodes have the various servers listed, and configured as "Stand Alone".

Now, do I add all 4 nameservers to each server, or do I just need to add 1 nameserver to each server? Will one DNS server entry on each server be enough?
Will it make an impact on the performance, especially on the web servers?


Lastly, do I need to sync the 4 DNS servers with each other? i.e. do I need to add each one of the 4 nameserver as a cluster member, and change the role to syncronize changes?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
41
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello SoftDux,

You would want to add each of the 4 nameservers to the cPanel web servers and have them set to synchronize changes on the web server to each of the 4 nameservers, keeping stand alone as the role on the nameservers in WHM > Configure Cluster area.

As for the mention of having the various servers listed in the 4 nameservers, do you mean that the cPanel web servers are each listed in WHM > Configure Cluster area on each of the nameservers and listed as "Stand Alone" role? If so, great. If not, then that's the setup you should be having.

This basically will create the following setup:

Configure Cluster on cPanel web server:
webserver1 --> "Synchronize Changes" --> ns1, ns2, ns3, ns4
webserver2 --> "Synchronize Changes" --> ns1, ns2, ns3, ns4
webserver3 --> "Synchronize Changes" --> ns1, ns2, ns3, ns4
additional webservers --> "Synchronize Changes" --> ns1, ns2, ns3, ns4

Configure Cluster on nameservers:
ns1 --> "Standalone" --> webserver1, webserver2, webserver3, additional webservers
ns2 --> "Standalone" --> webserver1, webserver2, webserver3, additional webservers
ns3 --> "Standalone" --> webserver1, webserver2, webserver3, additional webservers
ns4 --> "Standalone" --> webserver1, webserver2, webserver3, additional webservers

I would keep each of the nameservers separate from each other to not sync to each other to ensure if one goes down or somehow loses records, it doesn't impact the other nameservers. This means, I would not recommend syncing the 4 nameservers with each other nor would I recommend clustering the 4 nameservers with each other.

Thanks.
 

SoftDux

Well-Known Member
May 27, 2006
1,023
5
168
Johannesburg, South Africa
cPanel Access Level
Root Administrator
Hello SoftDux,

You would want to add each of the 4 nameservers to the cPanel web servers and have them set to synchronize changes on the web server to each of the 4 nameservers, keeping stand alone as the role on the nameservers in WHM > Configure Cluster area.

As for the mention of having the various servers listed in the 4 nameservers, do you mean that the cPanel web servers are each listed in WHM > Configure Cluster area on each of the nameservers and listed as "Stand Alone" role? If so, great. If not, then that's the setup you should be having.

This basically will create the following setup:

Configure Cluster on cPanel web server:
webserver1 --> "Synchronize Changes" --> ns1, ns2, ns3, ns4
webserver2 --> "Synchronize Changes" --> ns1, ns2, ns3, ns4
webserver3 --> "Synchronize Changes" --> ns1, ns2, ns3, ns4
additional webservers --> "Synchronize Changes" --> ns1, ns2, ns3, ns4
Does it impact the performance of the web servers if I add all 4 nameservers, as apposed to just one?

I would keep each of the nameservers separate from each other to not sync to each other to ensure if one goes down or somehow loses records, it doesn't impact the other nameservers. This means, I would not recommend syncing the 4 nameservers with each other nor would I recommend clustering the 4 nameservers with each other.

Thanks.

This was the other thing I wanted to know. So, I shouldn't sync the nameservers with each other. Thanx :)
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
41
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
If you aren't syncing the nameservers to each other (which normally you shouldn't), then you do need to have all 4 added to each webserver. The main point is to have the zones on each nameservers separate from each other as I mentioned, so it does impact proper syncing if you aren't adding all nameservers to each webserver to sync.

I'm uncertain how it would impact performance precisely on the webservers. The zones are going to the nameservers, so most of the processing is occurring on the nameservers for each of the webservers syncing to them.