New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How does ns1 and ns2 work?
Projectpop
Member
in Help
I have a DNS Cluster set up in WHM (ns1 in main server, ns2 in an leb).
When you go to intodns.com/mydomain.com, sometimes ns2 appears on top, sometimes ns1 appears on top.
ie. it shows:
ns2.domain.com
ns1.domain.com
instead of
ns1
ns2
Does that mean that it is served by ns2? Or is it always ns1 serving?
Thanks!
Comments
If I believe I understand what you are seeing on the site, the one on top is the one that provided the info. It will ping which every one responds first.
That's right. It will query the parent servers of the TLD for it's nameservers and then asks all the listed nameservers for information on the requested domain. Whichever server responds first will be listed first. Typically in your setup, as you probably have sites and such on the server listed as ns1, it's ping time will probably be a fraction slower than your secondary server.
Regardless of this, whatever nameserver you have in the SOA will be the primary nameserver of that domain although I believe that doesn't have much importance now.
NS records are served in round robin order
Great! Understood! Thanks everyone