Aggregated DNS Results for shorter DNS lookup times

Every DNS lookup your application performs can have adverse effects on the client - at times without you knowing it. It’s difficult to gauge what the lookup time is going to be like for remote consumers. So where possible we should attempt to minimize the time taken for a DNS lookup. This is particularly important for nested DNS queries - as in this example:

example.com ====> api-east-1.example.com
        (w/ latency)        |
                     (w/roundrobin)
                            |
                            ====> 1a.api-east-1.example.com
                            ====> 1b.api-east-1.example.com
                            ====> 1c.api-east-1.example.com
                            ====> 1d.api-east-1.example.com
                            ====> 1e.api-east-1.example.com

In this example there could be three DNS queries issued, and depending on the client lookup time this could add several milliseconds, or even seconds (on the client’s end) to your application’s response time.

And keep in mind that for most web based applications slow application response times means lost customers.

This is where Route53 shines, aggregating the lookup like so:

dig example.com

;; QUESTION SECTION:
;example.com. IN	A

;; ANSWER SECTION:
example.com. 0 IN CNAME	api-east-1.example.com.
api-east-1.example.com. 0 IN A	1a.api-east-1.example.com.
1a.api-east-1.example.com. 59 IN A 100.42.44.55

;; Query time: 28 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)

Typically other DNS providers will respond with individual responses:

dig example.com

;; QUESTION SECTION:
;example.com. IN	CNAME

;; ANSWER SECTION:
example.com. 0 IN CNAME	api-east-1.example.com.

;; Query time: 28 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)

dig api-east-1.example.com

;; QUESTION SECTION:
;api-east-1.example.com. IN	CNAME

;; ANSWER SECTION:
api-east-1.example.com. 0 IN CNAME	1a.api-east-1.example.com.

;; Query time: 33 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)

dig 1a.api-east-1.example.com

;; QUESTION SECTION:
;1a.api-east-1.example.com. IN	A

;; ANSWER SECTION:
1a.api-east-1.example.com. 59 IN A 100.42.44.55

;; Query time: 29 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)

This is done automatically if your DNS is hosted in Route53.