Configure Nameservers for Multi Servers

ImperialTrader

Well-Known Member
Aug 31, 2014
196
21
68
Egypt
cPanel Access Level
Root Administrator
I have 3 servers, Which option is better to configure my nameservers for each server?

Option 1:
VPS 1 >> ns1.s1.domain.com & ns2.s1.domain.com >> 1st server IP
VPS 2 >> ns1.s2.domain.com & ns2.s2.domain.com >> 2nd server IP
VPS 3 >> ns1.s3.domain.com & ns2.s3.domain.com >> 3rd server IP

Option 2:
Can I set (ns1.domain.com & ns2.domain.com) for all the servers?
If yes, then how can I set the DNS for the 3 server's IPs using the same (ns1 & ns2)?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
  • Like
Reactions: ImperialTrader

ImperialTrader

Well-Known Member
Aug 31, 2014
196
21
68
Egypt
cPanel Access Level
Root Administrator

Attachments

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello,


No it's not the same as a load balancer. A load balancer would balance traffic through to the different webservers, a DNS cluster will only direct DNS requests to the appropriate webserver.
 
  • Like
Reactions: ImperialTrader

ImperialTrader

Well-Known Member
Aug 31, 2014
196
21
68
Egypt
cPanel Access Level
Root Administrator
Hello,

No it's not the same as a load balancer. A load balancer would balance traffic through to the different webservers, a DNS cluster will only direct DNS requests to the appropriate webserver.
Thank you.

Do you think it's more professional to use DNS cluster and ask my clients to use only one main nameserver (ns1.mydomain .com & ns2) instead of asking them to use (ns1.s1.mydomain .com & ns2) then after (s1) server becomes loaded, I switch to a new server and ask the new clients to use (ns1.s2.mydomain .com & ns2) and so on..
 

ImperialTrader

Well-Known Member
Aug 31, 2014
196
21
68
Egypt
cPanel Access Level
Root Administrator
A lot of people use ns3/ns4/ns5 and so on, really it's up to you but you may want to stick with a naming convention such as this to keep things orderly.
Which is better in your mind?
1. To use DNS Cluster and ask all my clients to use One nameserver (ns1/ns2.mydomain.com)
2. To use each server it's own NS (ns1/ns2.s1.mydomain.com), then switch to (ns1/ns2.s2.mydomain.com) and so on..
 

ImperialTrader

Well-Known Member
Aug 31, 2014
196
21
68
Egypt
cPanel Access Level
Root Administrator
You might end up with more reliability if you use a DNS cluster properly in my opinion
I just tried it and it works fine, that's what I need exactly :)

If you don't mind, could you please review the configuration steps with me?
I have 1 master server and many slave servers
WHM >> Configuration Cluster >> At the master server, I add all the slave servers and at each slave server, I add the master server only
WHM >> DNS Cluster >> Shall I do the same?

Now all the websites DNS hosted at the master server will be copied to all the slave servers (Is it correct to do this step?)
Also all the websites DNS hosted at the slave servers will be copied to the master server only (Is it correct to do this step?)
Do you think this copying of all the websites DNS to all the servers is correct or it will confuse me later? Any other solution?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
I'm glad that worked out for you!!

I'd suggest using direct links, this is exampled in the documentation I linked as well. Each web server directly links to the nameservers.

Now all the websites DNS hosted at the master server will be copied to all the slave servers (Is it correct to do this step?)
If you configure the DNS cluster in the manner I explained, yes you'd copy all DNS information to the nameservers

Also all the websites DNS hosted at the slave servers will be copied to the master server only (Is it correct to do this step?)
You wouldn't want to do this - The webservers control the DNS and submit it to the DNS servers where it's hosted - they shouldn't be submitting zones back to the webservers
Do you think this copying of all the websites DNS to all the servers is correct or it will confuse me later? Any other solution?
If you're using direct links and just copying data from your webservers to the nameservers there shouldn't be too much confusion or actually much hassle either. When you add a new account cPanel automatically sends the new zone file to the nameservers and when updates to dns zones are made cPanel automatically updates the nameservers as well.
 

ImperialTrader

Well-Known Member
Aug 31, 2014
196
21
68
Egypt
cPanel Access Level
Root Administrator
I'd suggest using direct links, this is exampled in the documentation I linked as well. Each web server directly links to the nameservers.

If you're using direct links and just copying data from your webservers to the nameservers there shouldn't be too much confusion or actually much hassle either. When you add a new account cPanel automatically sends the new zone file to the nameservers and when updates to dns zones are made cPanel automatically updates the nameservers as well.
The link you sent me doesn't provide any steps on how to use direct links, it's just explaining what is direct links :)

Could you please tell me how to use it direct links to connect master server with slave servers?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
The diagram in the documentation shows you how to use Direct Links.

Webserver1->Nameserver1
Webserver1->Nameserver2

Webserver2->Nameserver1
Webserver2->Nameserver2

And so on.

You'd just set the webservers up to synchronize with the nameservers.
 

ImperialTrader

Well-Known Member
Aug 31, 2014
196
21
68
Egypt
cPanel Access Level
Root Administrator
The diagram in the documentation shows you how to use Direct Links.

Webserver1->Nameserver1
Webserver1->Nameserver2

Webserver2->Nameserver1
Webserver2->Nameserver2

And so on.

You'd just set the webservers up to synchronize with the nameservers.
Can I do that by adding (ns1/ns2.mydomain.com) to all servers at this step (WHM >> Basic WebHost Manager Setup)
And I add the master server IP to all the servers too at (Configure Address Records)?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello,

Can I do that by adding (ns1/ns2.mydomain.com) to all servers at this step (WHM >> Basic WebHost Manager Setup)
This is exactly how you'd do this, along with pointing the domains to the nameservers you've set.

And I add the master server IP to all the servers too at (Configure Address Records)?
You wouldn't need to do this with the cluster set up.
 

ImperialTrader

Well-Known Member
Aug 31, 2014
196
21
68
Egypt
cPanel Access Level
Root Administrator
You wouldn't need to do this with the cluster set up.
Tell me please if these steps are correct or not..

WHM >> DNS Cluster >> At the master server, I added the slave server and at the slave server, I did nothing!
Result = All the websites hosted on the slave server are down :(

WHM >> DNS Cluster >> At the slave server, I added the master server and at the master server, I did nothing!
Result = All the websites hosted on the slave server are up :)

when I create a new website at master or slave server, the dns is copied to the other server
Check this screenshot please (Adding the master server at the slave server)

DNS Cluster.png
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
DNS/Slave servers shouldn't have websites on them this is not the nature of DNS clustering. The DNS servers should be present for DNS zone files only. The webserver should synchronize it's DNS records with the DNS servers but the DNS servers should not need to synchronize the other way.
 
Last edited:

ImperialTrader

Well-Known Member
Aug 31, 2014
196
21
68
Egypt
cPanel Access Level
Root Administrator
DNS/Slave servers shouldn't have websites on them this is not the nature of DNS clustering. The DNS servers should be present for DNS zone files only. The webserver should synchronize it's DNS records with the DNS servers but the DNS servers should not need to synchronize the other way.
I'm sorry but there is a still misunderstanding :(
I think I don't have DNS server, all I have is just 3 servers and I need to use one nameserver only for all of them.
I just need to know the steps of DNS cluster which will allow me to do that.

Each server is holding 100 clients, so I have totally 300 clients
What I should do now to allow all my clients to use only one nameserver..