Directional Records Pointing to Monitored Pools
CompletedThere are already a pair of article about configuring Directional Pools:
and SiteBacker Pools:
https://dns.ultraproducts.support/hc/en-us/community/posts/25903180352155-Configuring-SiteBacker-DNS
Directional pools allow giving answers based on geography and/or the client's IP address. SiteBacker (as well as Traffic Controller and other monitored pools) allow monitoring a pool of servers and only returning addresses that answer our periodic probes.
But what if you want both functions? For example, a company might have two (or more) data centers, and with several servers in each. How could you monitor the servers, and return server addresses that are currently working, and which are from the closest data center to the client requesting the address?
I'll use "example.com" as my domain. (To avoid confusion: I'm using example.com because it is reserved for use in documentation. Someone actually has configured DNS for example.com; my examples here are NOT included in the DNS configured for example.com, they're just examples for this article.
Let's say we have two data centers, one in Chicago, one in Amsterdam. Clients in North and South America should normally be sent to the Chicago data center; clients from other locations should normally be sent to the Amsterdam data center. Each data center has two servers, and we want to monitor to be sure that we only return addresses for servers that are working. If both servers in a data center are not answering, we should return addresses for the (still working) servers in the other data center.
The monitoring and failover aspects of this could be done with any of the monitored pool types (subject to the limits on some types of pools), but to build on the SiteBacker (SB) article referenced earlier, I'll assume we're working with SB pools. Here's how I'd configure the pool for the Chicago data center:
chicago.example.com name for the SB A record pool
1.1.1.1 first server
1.1.1.2 second server
amsterdam.example.com. all fail recordThe pool behavir could be configured however you want it (serve just one address, serve both addresses, etc.; probe configuration should also be completed.)
The configuration for amsterdam.example.com. is essentially the same, but with addresses for the Amsterdam servers, and with chicago.example.com. as the all fail record.
At this point, you could do some simple testing (dig at one of your assigned servers, make sure that chicago.example.com. and amsterdam.example.com are working as expected. You can even force fail one or both records in a pool to be sure that it does what you expect when one server or both servers are down. Note that it's important to query one of your assigned UltraDNS servers directly; if you use your normal recursive resolver, you'll get quite confused because if you have to update anything, the old data is likely to be in your recursive resolver's cache, so you may see outdated data till the cache expires.)
There's one more thing to do before configuring the Directional Pool; I prefer to explicitly set what addresses or pools are used for each region rather than using the “all nonconfigured” record for some regions, but Directional Pools insist on having an "all nonconfigured" address...and you can't use the same name for that and any other group of regions. So I would create a CNAME:
nonconfig.example.com. 3600 IN CNAME chicago.example.comto let me send any queries from non-configured regions to the Chicago data center.
Finally we can configure the directional pool:
www.example.com
nonconfig.example.com. the response for non-configured regions
chicago.example.com. queries from North and South America
amsterdam.example.com. queries from anywhere else in the worldIt can be confusing if you need both A and AAAA directional pools. The issue is that you run into type issues and colliding names if you use the same names for both A and AAAA SB pools when you try to add them to Directional pools. The solution is to use different names for the SB pools for A and AAAA. So I might use:
Rec Type Dir Pool name SB pool names
A www.example.com chicago.example.com.
amsterdam.example.com.
AAAA www.example.com chicagoAAAA.example.com.
amsterdamAAAA.example.com.And I'd add different CNAMEs for the all nonconfigured group, possibly using:
nonconfig.example.com. 3600 IN CNAME chicago.example.com
nonconfigAAAA.example.com 3600 IN CNAME chicagoAAAA.example.comThat gives different names for the A and AAAA SB pools and CNAME records, which allows configuring both A and AAAA Directional Pools.
Finally, you probably will want to use this sort of configuration for WWW servers, which means configuring it for both www.example.com and for example.com itself. Because some of the records involved with this are CNAMEs, you can not do this sort of configuration as the apex record. Instead, you can configure it (as I did in this article) for www.example.com, then add an Apex Alias for example.com, pointing it to the www.example.com Finally, you probably can't configure Directional Pools (at least if they refer to SiteBacker pools) at the apex of the zone. If you want to be able to support Directional / SB combinations at the apex, you need to configure them at some other name (typically www in the zone), then use an Apex Alias to redirect to the www record, so you'd configure an Apex Alias for example.com, pointing to www.example.com.