How to balance the root domain using NS records?
- by Patrick McCurley
I have two load balancers that balance incoming traffic across multiple data centers. These work fine. I can test them out by doing an 'nslookup mydomain.com xIP'
I have now taken out DNS services with DYN.com to allow me to manage the DNS Zone file so that typing mydomain.com will ask my load balancers what the IP address is to resolve.
Step 1 : the NS record for www.
I set up A records (glue) for ns1 & ns2, then the corresponding NS record to delegate the DNS lookup to the balancers instead of DYN.com's nameservers.
ns1.mydomain.com A [ip address of load balancer 1]
ns2.mydomain.com A [ip address of load balancer 1]
www.mydomain.com NS ns1.mydomain.com
www.mydomain.com NS ns2.mydomain.com
All is well - when I type www.mydomain.com, the requests get delegated to my load balancers who provide the IP address of the endpoint and the connect is made successfully.
Step 2 : the NS record for root.
This is where I run into problems. I need customers to be able to type 'mydomain.com' (without the www) and ALSO get delegated to the load balancers for the IP address.
However - of the research I have done, and through the DYN control panel, it seems to be not allowed to provide an NS record for the root - as this overrides the default NS servers.
How can i delegate both the root, and the www. to my load balancers?