DNS Round Robin: Multiple Nameservers VS Multiple A Records?

Solution 1:

The Goal: to make the client's web browser select the next available server if one is down instantly.

That's generally done by introducing a 3rd server, called a load balancer. The load balancer:

  1. Directs traffic to the 2 web servers.
  2. Monitors the health of the 2 web servers.
  3. Switches traffic to the remaining web server if one fails.

The load balancer itself can be made highly available by using 2 load balancers (LB), i.e. at least 4 servers (2 LB's, 2 webapp servers) in total. However, many smaller shops run with just one load balancer, because they are relatively simpler systems, and will often be very reliable.

Method 1: Do I set my nameserver entries at Godaddy like this? 1. ns1.serverA.com 2. ns2.serverA.com 3. ns1.serverB.com 4. ns2.serverB.com

Absolutely not. The name servers are only used for resolving the IP addresses of the web servers. Keep the name servers for the domain to your registrar/DNS host (GoDaddy) defaults.

Method 2: Or do I make Godaddy as my nameserver and add A Records like this: 1. A @ 1.1.1.1 2. A @ 1.1.1.2 3. A @ 2.2.2.1 4. A @ 2.2.2.2

When DNS Round Robin (DNS RR) is used as part of a high-end failover / high availability setup, then the IP addresses the DNS RR points to are highly available. In other words, each IP address is a virtual IP handled by 2 devices. As a pure high availability solution, without higly available server IPs, DNS RR doesn't work too well. The basic problem is that some clients may continue to use the 'dead' IP address, you're relying on the client doing 'the right thing', and not all clients do. Using a real HTTP load balancer is better.

That said, many small websites use DNS RR for load distribution only with good results. It's all about your expectations I guess.

In the DNS RR case, having 2 IP addresses per physical server gives you nothing, only extra complexity. So just use one IP for each server, in your notation:

A @ 1.1.1.1
A @ 2.2.2.1

Solution 2:

You would usually go for the "A record" approach. You can control TTLs too on the A records which some ICANN registrars might ignore on the NS records.

Round Robin DNS is great but beware some browsers (older IEs for example) can cache records for too long so if one of your Web Servers fails and you drop its IP from the published DNS then you might still get a few visitors going to that IP (a pretty small percentage all the same but enough to get a complaint or two). It's very good for load balancing though.