I'm trying to make our set of servers more fault tolerant. I have a web server, a mail server and a PBX server that uses SIP. I know that for each service, I can have the DNS return multiple A, MX and SRV records respectively. However I'm not sure if the DNS will indicate which record the client should use first or second.

For instance, if my primary mail server is reachable, I want mail clients to always connect to that one and never the back up. Like wise, if the primary is unreachable, I want the client to then try the back up.

I know that their are other ways to implement fault tolerance (I'm looking into them), but I want to know specifically if DNS resolution will work this way.

2 Answers 2


It depends on the protocol/client software. For MX and SRV records you can set the "Weight" attribute to encourage the client to do what you want. For generic DNS you are stuck with round robin which different OSes handle differently.

  • Excellent, this is precisely what I was asking about. Aug 22, 2013 at 19:45

Application and service failover isn't a function of DNS. With Round Robin DNS you're merely resolving the DNS requests for a particular DNS record to multiple resources. DNS has no way to know that the service being provided at one host is unavailable and has no mechanism for resolving queries to only those hosts that are available.

That's the job of the client application or of the server service. You need to implement failover in the client application or in the server service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.