Using API to 3 cPanel DNS only servers

jameshsi

Well-Known Member
Oct 22, 2001
347
0
316
We set 3 dnsonly vps for our DNS, dns1.domain dns2.domain & dns3.domain

Then we use cpanel API to tell dns1.domain to create/modify/delete a domain's setting, for example add a a record, cname …etc.

After dns1.domain received the API command, it then synchronize DNS records to dns2 & dns3.

We found if one of dns2 or 3 down, the web UI will wait more than normal, it probably caused by API command need to wait dns1 to response, since dns2 or 3 is down and it is waiting time out to response.

We don't understand why the API not just response right away, after all, the command is just tell it to modify dns records, it should response the API then do the synchronize.

We also found there are some other setting, to keep 3 dns servers sync.

API--> dns1 -->dns2 & 3 using method "synchronize changes"
API--> dns1 -->dns2 -->dns3 using method "synchronize changes"
API--> dns1 -->dns2 & 3 using method "write only"
API--> dns1 -->dns2 -->dns3 using method "write only"

It seems to me that "synchronize changes" and "write only" are same, I don't understand what's the differences between them.

I want to keep 3 dnsonly servers all the same records, which way is the best way to set ?

is it possible to not waiting so long while one of the dns server down ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

You can find a full guide on clustering at:

cPanel - Configure Cluster

I suggest directly linking the web server to the nameservers. EX:

WebServer - NS1
WebServer - NS2
WebServer - NS3


When selecting "Write Only", the server will write changes to the remote server, but when this server loads zone files, it will not obtain zone data from the remote server. For "Synchronize changes", all changes made on the server will propagate to any server in the cluster that is linked to this server. Synchronization is one-way: changes made on another server will not propagate to this server unless "Synchronize changes" is selected on the other server as well. If one name server is down, you should investigate to see why it's not responding.

Thank you.