I am trying to provide a level of failover control (between 2 sites) using DNS (bind9), and I am unsure if what I am planning to do is compliant with the specs and if it will work reliably.
The core of the question (simplified - I know I need more then 1 nameserver in reality and there are better ways of handling the simplified version below - my actual solution will include multiple nameservers, multiple views and other stuff like hooks into an application and additional subdomains) is this -
If I have 2 nameservers (one in LA and one in UK for example), with the server in the UK being the active server, is it acceptable to have the following zone layout:
on LA Server:
(SOA Serial 2013013101) domain.name. NS ns1.domain.name. domain.name. NS ns2.domain.name. ns1.domain.name. A LA.server.ip ns2.domain.name. A UK.server.ip www.domain.name. NS ns2.domain.name. ww2.domain.name. NS ns2.domain.name.
on UK server:
(SOA Serial 2013013101) domain.name. NS ns1.domain.name. domain.name. NS ns2.domain.name. ns1.domain.name. A LA.server.ip ns2.domain.name. A UK.server.ip www.domain.name. A UK.server.ip ww2.domain.name. A UK.server.ip
The idea here being that requests to www.domain.name and ww2.domain.name are always directed to UK.server.IP via DNS. (I want to do this so that if there is an extended outage in the UK, I can change the zone on the LA server and get up and running again - without making changes with the registrar). Of-course, both ns1.domain.name and ns2.domain.name will be provided as IP addresses for the registrar.
My concerns revolve around the SOA serial numbers and if I'm breaking spec by having different answers for the same zones, and if DNS resolution/redirection will work as expected. (I assume this will all work OK if I split the UK server into multiple zones, one like the LA zone, and zone for www.domain.name and ww2.domain.name - but It would be cool if I can avoid this)