Does the users will connect automatically to the closer dns server or I need to set something in my records?!
Thanks everyone for the help
This question came from our site for professional and enthusiast programmers.
I'll just try to expand Alnitak's answer.
As Alnitak mentioned, end-users normally don't connect to your servers, instead users normally connect to their ISP or other public caching/recursive DNS servers (like google 184.108.40.206), which in turn connect to your authoritative servers.
Thus user which located say in Russia, but uses US-based recursive servers, for your purposes behaves as if located in US. Usually (I'd assume it's >90%) the aforementioned recursive servers reside close to the users themselves or at least in the same region, but not it is not always so.
Now, which of your DNS servers recursive servers will use: It depends on a particular nameserver software implementation (i.e. recursive nameserver, not your authoritative one) At first they will randomly try any server, later they will tend to use the "closest" (by responce time) more often and "distant" less often.
As authors of the most widely used nameserver put it:
All of it have nothing to do with DNS records, and DNS records can not change this process.
Bottomline: Users automatically tend to use the closest server somewhat more often than others.
In this answer I don't mention anycast which really changes the picture, but it's price and complexity is prohibitive for many users.
End users don't (typically) connect to your authoritative servers.
Users connect to recursive servers, which may use algorithms based on round-trip-time (RTT) to choose which authoritative servers to talk to in order to resolve your domain.