Setting up DNS Syncronization

So, I’m in the process of setting up an Interworx VPS cluster…and I’m not really the best with DNS. Hopefully someone can let me know if what I’m planning on doing will work.

I’m wanting to have 3 DNS servers, two nameservers for each of those…ns1-ns6. I’m planning on having each of these listen and publish to each other.

My question is when I add a 4th server, wouldn’t I have to add another nameserver to that server (since it’s required to setup interworx). So I’d have to do ns7-ns8 for the next server. There isn’t way to allow one of the already existing nameservers to work for that servers dns? If there is…how would I go about doing that? (sorry…this is where DNS confuses me…hopefully some day soon I’ll “get” it) :).

Each Iworx server comes with a DNS service. A nameserver is basically just a DNS server.
In order to sync the DNS information between your servers, you just need to go to ‘DNS service’ > ‘Synchronization’.

If you plan on running nameservers, I would recommend contacting your registrar and have them set up glue records for your nameservers for best performance.

Hi staxed

I hope you don’t mind, and your correct in that each server would use its own dns server, and you would call it ns7, ns8 etc…

However, you can set it many ways as follows

Set sync of dns to all dns servers and Set at registrar for ns1 and another ns, say ns4

If your your own registrar, just set to any ns servers you want to

I personally would use the primary from server and another from your slave dns, such as ns7 and ns1 etc

You can use more then 2 ns but only upto 10 ns.

I hope this helps and sorry if I am wrong and please follow Evanion advice, he is very experienced.

Many thanks

John

Hi

Sorry, where I state you can use 2 ns and upto 10 ns, this is for ns published for domain and not number of ns servers you may have, so you may have 20 servers, but any domain can only publish upto 10 ns out of these 20 as an example.

I hope you don’t mind, but I was not clear and could lead to confusion.

Many thanks

John

Thanks for the help guys, but I think either you didn’t understand my question…or I didn’t explain it well enough :). I’ve been doing hosting for a while now, so I know the basics of DNS. Not trying to figure out how to actually create nameservers as I know that already :).

I’m just trying to figure out the best way to go about having redundant DNS through the use of the syncronization feature of Interworx.

I have setup my current 4 servers to all listen and publish to each other, but when I add another server I think I should just be able to make the current 4 listen to it without having it listen to them, as I think 4 synced servers should be plenty right?


The part that I’m having a hard time figuring out is how would I get one servers accounts/websites to use the nameserver from another server to provide redundancy in DNS? Say I have domain.com hosted on server1, server one has its nameservers listed as ns3 and ns4…how do I make that redundant? Is it as simple as having the actual A record for ns3 and ns4 listed on separate servers? I just don’t think I’m explaining my question very well :(.

Hi staxed

Sorry, I’m sure it’s me not understanding sorry.

Yes, sync the server to the actual dns servers you want redundancy on, say server 1 and 2, so servers 1 and 2 dns knows about the zones in your server 5 (new server), but server 5 only knows the zones local to itself.

Change the dns template for server 5 so ns are set to your preferred ns, ie ns1 and ns4 as an example.

I think that’s all that’s needed from memory, as above the A records are created automatically.

Please remember there will be delay in sync of dns and also resellers or siteworx users could possible change ns from their control panel.

I’m sorry if I’m wrong or have missed anything.

Many thanks

John

I am just pondering a similar question. If our network grows considerably, how would you propose to do the sync? I am thinking of picking 2 servers that should be ns01 and ns02 for every server in our network and then add each new server as 3rd DNS. This way all changes on the server get synched to ns01 & ns02 and from there to the rest of our servers.

srv01 has ns01 (itself) and ns02 and some optional third ns
srv02 has ns01 and ns02 (itself) and some optional third ns
srv03 has ns01 and ns02 and ns03 (itself)

srv16 has ns01 and ns02 and ns16 (itself)

srv45 has ns01 and ns02 and ns45 (itself)

I would set up the synch on each server accordingly, i.e. ns01 and ns02 synch with all of them. Does this make sense? From what point on would the load ccreated by the sync pose any problem? Or would some kind of round robin sync be better? Or would you sync each and every server with all of them (sounds dangerous).

Hi mdeinhardt

Good question, and one which is probably asked more then people think.

I would think if your upto 45 servers, then if I was myself, I would dedicate a server just for dns, or if in cluster, also set dedicated dns as a last resort helper to cluster for hosting/email.

I would think the way you purpose sounds fine, but you may spend more on ip addresses or use more ip addresses.

Are you planning on clustering them, if so, I’d use my first thought, even if you only had 10 or more. Also, hopefully this year, IW may announce a new feature, which if they do, and your looking at a number of servers, I’m sure you would be interested in. Sorry, cannot say to much but there were an announcement late last year.

The loading is hard to say, as it depends upon the calls, but should not be a real issue I believe, unless you come under DDos on dns., and the spead of sync depends upon the servers hardware/loading and connections.

I hope that helps a little

Many thanks

John

Hi John,

thanks, as always, for your help and your thoughts. And you are right, there is a limit of servers, where it makes much more sense to spend some money on dedicated machines for DNS, MySQL, Mail and so on. I guess I exaggerated a bit with 45, I was just trying to make a point :wink:

So I’m going to go with 2 central servers and each new server syncs to those as a 3rd until our network grows out of this. And i think I know what announcement you are referring to and that’s great. So when we grow, Interworx can simply grow with us (or better the other way around).

Thanks and have a nice evening.

Michael

Hmm, just stumbled over some error. When I try to add a new server, I get “DNS host already exists in sync : ns03.xxx.xxx” if I try it on ns01 and “API failure : Authentication Error (ApiKey)” on ns03. I can’t make much sense of the second error, but the first sounds like I can’t sync each server more than once?

I have

ns01 synced with ns02
ns02 synced with ns03

So I can’t sync ns03 with ns01 because they are already linked via ns02? Then my above idea is not working and each server can only be synced once? If so, what would be better, serial or radial (i.e. daisy chain or centralized)?

And if that is true, this should be mentioned somewhere (Nothing about it in the FAQ).

Hi Michael

Many thanks, and to be honest, even with 2 servers I would cluster, but set the slave as MySQL and have it set to help out on hosting. I would also set it to last resort for email.

The sync dns is correct as you state, in that you only need to sync 1 as using more then 1 duplicates, therefore error. Or if ns3 sync to ns1, then you don’t need to sync ns4 as well. To set correctly I believe you do the following based on 2 servers, ns1 and 2, and ns3 and ns4, sync ns3 to ns1.

Personally on this setup, if sync both to each other, and have ns1 and ns3 on 1 server, and ns2 and ns4 on the other, so each share the load.

Interestingly though, in my experience, dns calls which fail on 1 NS do not auto switch to the secondary or tertiary NS, and I’m not talking about IW NS/dns here, it was shown the case using Nominet, but this is just my experience when we had a major issue.

I hope that helps a little

Many thanks

John

Hey John,

Clustering will be one of the next steps, but right now we want to get the basics right first. But on the other hand, clustering helps with performance and only together with HA improves security. Our current approach is to have enough servers ready so that any serious failure can be worked around by restoring backups on another, identical server. This is not HA and not quickly done, but it works until we reach a size that makes clustering with HA feasible.

So back to synching, you would say sync in pairs and then sync those pairs to each other, like 1-2, 3-4, 5-6, 7-8 and 1-3, 5-7 and 3-5 and so on? Seems a bit confusing, right? Why not simply 1-2, 2-3, 3-4, 4-5, 5-6, 6-7 and so on? Or my original idea (2 main NS), slighty adapted: 1-2 and 1-3, 1-5, 1-7 and 2-4, 2-6, 2-8 and so on?

Cheers,

Michael

Hi Michael

Many thanks, and sorry, yes can become confusing on dns.

The thing to remember is you only sync 1 NS and not both, so using your original where server 1 has ns1 and 2, server 2 had ns3 and 4 and server 3 has NS5 and 6, then all that needs syncing is ns3 to ns1 and ns5 to ns1, but set your server NS to server 1, ns1 and 2, server 2 to ns3 and ns1, and server 3 to ns5 and ns1. You could use the even NS 2, 4 and 6 or which ever mixture you want. Obviously, ns1 is master and has all dns for ns3,4,5,6 but notice I set in my example, server 2 uses ns3 for its master and ns1 as secondary etc… This is to try to keep loading of ns1 for all.

I hope that helps a little and sorry to sound confusing.

Many thanks

John

Hi John,

hahaha, now I really am confused :wink:

What do you mean by “both” (you only sync 1 NS and not both) ? It sounds like you assume there’s 2 NS running on 1 server? Or do we mix DNS sync and name server entries for each server?

My plan in detail:

Server 1 has the following nameservers: NS 01 (Master), NS 02 (Slave 1) and NS 03 (Slave 2)
Server 2 has the following nameservers: NS 01 (Master), NS 02 (Slave 1) and NS 03 (Slave 2)
Server 3 has the following nameservers: NS 01 (Master), NS 02 (Slave 1) and NS 03 (Slave 2)
Server 4 has the following nameservers: NS 01 (Master), NS 02 (Slave 1) and NS 04 (Slave 2)
Server 5 has the following nameservers: NS 01 (Master), NS 02 (Slave 1) and NS 05 (Slave 2)

Each additional server will be added as their own 3rd NS. Does this make sense at all?

Edit: For others who read this, I mean the “Default DNS Servers” which you enter in Nodeworx under “System Services / DNS Server / Overview”, i.e. the name servers that this machine will ask for DNS resolving NOT the DNS services running on that machine

The DNS servers (or better, the DNS service running on each server) are synched to each other like this:

NS 01 - NS 02
NS 02 - NS 03
NS 03 - NS 04
NS 04 - NS 05

And if there are more servers, we could start using NS 02 or NS 03 as Master, but then somewhere along the line a dedicated DNS is starting to make sense.

Hi Michael

Sorry, yes more confusing sorry

The easiest way to look at this I think is as follows

Server 1 with 3 NS - each of these 3 NS pull data from the same dns server on this server. Same with server 2, 3 and so on

You only need to sync each server to each other or master, and it should sync all 3 NS for that server. Hence only sync 1 NS to master.

On the slave dns servers, you would set the NS for master and additional on that server, say ns3 to spread the load. If you then decide to go full dedicated dns, you only set the NS to the dedicated on all servers.

I hope this makes more sense and helps a little

Many thanks

John

Hi Michael

Actually, rereading your post, your idea would work, but with each server gradually knowing more dns,

Many thanks

John

Hi John,

yes, but i would simply give each one only 3 Default DNS servers, thats enough.

I got something else now, when I set up the sync between two of the machines, only a listener is installed, no publisher. All other machines always installed both, listener and publisher.
In this case I try to sync srv04 to srv01 and now there is only a listener on srv04 and a publisher on srv01. No matter where or how I setup the sync, I only get one way sync.
srv01 syncs both ways to srv02 and srv02 sync both ways to srv03.
All settings hsould be identical on those servers incld. the firewall.

Any idea?

I just tested further and can’t make heads or tails of it. I am almost certain that I could set up a sync between 2 machines by entering the hostname and ASPI key on just one machine and this would create a publisher and listener pair each on both machines.
Now after some testing, deleting and re-creating syncs, I can only set up a listener on each machine (with the publisher being created on the other machine), meaning I have to add hostname and API key on both machines. After that, the publisher on each machine reports succesfull sync, but the corresponding listeners report “Last sync - Unknown” and “Last status - None”.
Curious.
Also, the automatically created publisher is on the wrong IP. These are machines with 2 IPs but DNS is only enabled on one of them. The publisher reports itself to be on the unused IP?!?

Hi Michael

Yes, that’s correct, you set up sync on each server as it’s one way sync.

The error your seeing is because of some additional code I think it is transferring on api, which I’ll post what to remove as soon as I remember

The wrong ip on dns, I’m not sure, but will have a think about it. I think it pulls from primary dns ip.

Many thanks

John

Hi Michael

Sorry, tapatalk has changed and I cannot see post whilst typing reply.

Dns ip, you need to add the correct ip to use for dns in nodeworx, system setting, dns, overview, to the right is the list of ip been used and those additional ip you added, but not activated for dns - IW does not autoactivate new ip for dns.

At the same time, you can remove the wrong ip for dns service.

I hope that helps

Many thanks

John