Accelerating first time DNS resolution

The first time a domain is queried (most often by an ISP’s recursive DNS resolver), an extra lookup must be performed to learn which nameserver to use. For most domains, this isn’t much of a concern. However, for those that do want to reduce this initial lookup time, DNScaster offers an innovative feature to accelerate first time resolution by avoiding this extra lookup.

The extra lookup is performed by quering the TLD (top-level domain) nameservers for information about the desired domain. For example, the nameservers for .com are queried for information about some-domain.com.

While TLD nameservers always return a list of nameservers for the queried domain, they will also return the IP addresses of those nameservers if those nameservers belong to the same TLD and are configured as vanity names (technically, if they’re added as glue records). Including these IP addresses saves an extra lookup, which accelerates the first time lookup of your domain.

For example, if some-domain.com’s nameserver is ns1.example.org, the nameserver IP will never be included because the domain is .com but the nameserver is .org. If some-domain.com uses itself for the vanity name ns1.some-domain.com, the IP will be included. But what about if some-domain.com’s nameserver is ns1.example.com? In this case it depends on whether ns1.example.com has a glue record or not. DNScaster always creates these glue records, so the IP will be included.

To solve the case of differing TLDs and IP addresses not being included, DNScaster makes it easy to configure multiple vanity names for a single set of nameservers. The ideal scenario is to configure one vanity name per TLD. This is the minimum possible configuration to successfully accelerate first time DNS lookups for all your domains.

Let’s take a look at what this configuration might look like. First, let’s assume we have several domains spread across the .com, .net, and .io TLDs. In this case, we’ll need 3 vanity names configured for our nameserver set, one for each TLD:

Domain Vanity Name Domain’s NS Naming
vanity-domain.com ns[1-3].vanity-domain.com Vanity: ns[1-3].vanity-domain.com
vanity-domain.net ns[1-3].vanity-domain.net Vanity: ns[1-3].vanity-domain.net
vanity-domain.io ns[1-3].vanity-domain.io Vanity: ns[1-3].vanity-domain.io

Configure each of these like any other vanity name.

Next, make sure each remaining domain is assigned to its TLD-matching vanity name:

Domain NS Naming
some-domain.com Vanity: ns[1-3].vanity-domain.com
other-domain.net Vanity: ns[1-3].vanity-domain.net
your-app.io Vanity: ns[1-3].vanity-domain.io
another-app.io Vanity: ns[1-3].vanity-domain.io

If you have domains on a TLD that doesn’t need to be accelerated (perhaps it’s for internal use only), those domains can be assigned to any vanity name.