If you have a domain, I am sure you are aware of the fact that every domain has at least 2 nameserver entries associated with it. According to Wikipedia, a name server is a computer application/service that maps a domain name to an IP address. DNS (Domain Name System) is the protocol implemented by Internet name servers wherein every domain is required to have a primary nameserver (ex: ns1.example.com) and at least one secondary nameserver (ex: ns2.example.com). If the primary nameserver goes offline, the secondary nameserver would ensure that the domain is still reachable.
Most of the domain names that registered and hosted have nameserver entries assigned to them by either the domain registrar or the company that is hosting the domain. Almost every company ensures that the primary and secondary nameserver addresses are on two different networks so as to provide redundancy in case the primary goes down. But how effective is this strategy? Let’s look at two hosting scenarios and determine what happens when name servers fails.
This will NOT work even when primary or secondary are available.
A domain is hosted on a server and has two name server entries on two different networks. The server goes down, the domain is no longer reachable. Why? – Because there is a single point of failure. Got it?
This will NOT work when primary name server is down but secondary nameserver is available.
A domain is hosted on two servers in two different networks, primary nameserver points to the server in first network and secondary nameserver points to the second server in a different network. The first server goes down, the domain still points to first server. Your site is not reachable. Why? – Even though you have two nameserver entries on two different network, there is no domain failover service or mechanism used.
So what do you do to ensure that your website is always available?
Employ a DNS failover service that will watch your primary server and when it goes down, the dns failover service will automatically forward incoming traffic to the second server. Yes, the best strategy would be to maintain the exact copy of your website on two different servers in two different networks.
So, don’t leave your site under the assumption that if the primary nameserver will go down, your site will still be reachable. We recommend that you talk to your hosting company and get to know the facts about the availability of your nameservers and website. Goodluck!