V
V
Viktor2014-10-05 14:07:18
Domain Name System
Viktor, 2014-10-05 14:07:18

Do all requests necessarily go to the ns1 server when ns1 and ns2 are available?

I want to build a highly stable service.
I have one working vds and one spare vds. On each of the vds, I put bind9 for the my-site.ru zone and configured it so that each of the dns servers gives its ip as the site's my-site.ru address.
This is how it is on the image.
dns.png
So it turns out that if one of the servers goes down, both the dns server and the service itself will go down at the same time, since they are located on the same machine. Accordingly, as one of the dns servers falls, all traffic goes to the second one.
But when 2 dns servers are working at the same time, are requests between them separated in some way or do all requests go first to ns1 and then, if it is not available, then to ns2?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Chistyakov, 2014-10-05
@Levhav

When 2 DNS servers are working at the same time, requests between them are distributed evenly (actually, not quite evenly, this is a simplification, but for your purposes it is enough to assume that evenly).
Responses can be cached on providers' servers around the world and taken from the cache if the TTL is not expired, so the option "go to ns1 first and then if it is not available, then to ns2" only works if the desired answer was not found in the provider's cache . In addition, the slave DNS server, if the master server is absent for a long time, will eventually invalidate all records, since they will expire - you also need to monitor this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question