Wednesday, 17 August 2011

DNS Load balancing

This is an outsiders perspective on how akamai do DNS based load balancing. The website we will be looking at is www.theage.com.au. See previous post on how to manaually follow the delegation chain but in summary it as follows:

DomainName Servers
.root server
auau root servers
com.auau root servers
theage.com.auAkamai name servers below

ns1-207.akam.net.       20727   IN      A       193.108.91.207
usw4.akam.net.          9913    IN      A       64.211.42.196
usc4.akam.net.          10282   IN      A       96.17.169.10
usw2.akam.net.          14102   IN      A       64.211.42.196
ns1-179.akam.net.       20727   IN      A       193.108.91.179
asia2.akam.net.         12896   IN      A       63.150.131.81
eur5.akam.net.          10282   IN      A       62.41.62.233
use5.akam.net.          18317   IN      A       81.52.250.132


I believe this table remain the same across the various continents and converts the customers domain name to a akamazied name in the g.akamai.net subdomain. No metric are used at this point and its purely a static mapping. In this case:

;; ANSWER SECTION:
www.theage.com.au.      300     IN      CNAME   dsa.f2.com.au.edgesuite.net.
dsa.f2.com.au.edgesuite.net. 17178 IN   CNAME   a1040.g.akamai.net.

;; AUTHORITY SECTION:
g.akamai.net.           1000    IN      SOA     n0g.akamai.net. hostmaster.akamai.com. 1313505437 1000 1000 1000 1800


 When you now query the name servers for the g.akamai.net you then get a metric enabled veiw of the network and get pointed to the closest server. The traceroutes in each of the sections below shows that it there is onlyl 3-4 hops between source and destination.

See this and this for further info.




Australia

12:00am zzz:~ > dig www.theage.com.au

; <<>> DiG 9.6.1-P1 <<>> www.theage.com.au
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44302
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 9, ADDITIONAL: 6

;; QUESTION SECTION:
;www.theage.com.au.             IN      A

;; ANSWER SECTION:
www.theage.com.au.      300     IN      CNAME   dsa.f2.com.au.edgesuite.net.
dsa.f2.com.au.edgesuite.net. 18657 IN   CNAME   a1040.g.akamai.net.
a1040.g.akamai.net.     20      IN      A       144.135.8.238
a1040.g.akamai.net.     20      IN      A       144.135.8.239

;; AUTHORITY SECTION:
g.akamai.net.           1004    IN      NS      n6g.akamai.net.
g.akamai.net.           1004    IN      NS      n5g.akamai.net.
g.akamai.net.           1004    IN      NS      n3g.akamai.net.
g.akamai.net.           1004    IN      NS      n7g.akamai.net.
g.akamai.net.           1004    IN      NS      n8g.akamai.net.
g.akamai.net.           1004    IN      NS      n2g.akamai.net.
g.akamai.net.           1004    IN      NS      n1g.akamai.net.
g.akamai.net.           1004    IN      NS      n0g.akamai.net.
g.akamai.net.           1004    IN      NS      n4g.akamai.net.

;; ADDITIONAL SECTION:
n1g.akamai.net.         425     IN      A       61.9.193.171
n7g.akamai.net.         1284    IN      A       61.9.193.171
n4g.akamai.net.         1284    IN      A       61.9.193.173
n0g.akamai.net.         1080    IN      A       125.56.205.28
n2g.akamai.net.         1622    IN      A       125.56.205.45
n5g.akamai.net.         379     IN      A       61.9.193.171

;; Query time: 246 msec
;; SERVER: 10.202.200.215#53(10.202.200.215)
;; WHEN: Wed Aug 17 00:12:37 2011
;; MSG SIZE  rcvd: 395


The traceroute to 144.135.8.238 is then


  1 TenGigabitEthernet0-12-0-2.exi-core1.Melbourne.telstra.net (203.50.80.1) 4 msec 0 msec 4 msec
  2 Bundle-Pos3.chw-core2.Sydney.telstra.net (203.50.11.14) 16 msec 12 msec 12 msec
  3 TenGigabitEthernet8-1.pic2.Sydney.telstra.net (203.50.20.185) 12 msec 12 msec 16 msec
  4 telstr810.lnk.telstra.net (165.228.132.18) 20 msec 12 msec 20 msec
  5 144.135.8.239 16 msec 16 msec 16 msec

Europe (Germany)


; <<>> DiG 9.2.1 <<>> @dns.taide.net www.theage.com.au a
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6203
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 9, ADDITIONAL: 0

;; QUESTION SECTION:
;www.theage.com.au.		IN	A

;; ANSWER SECTION:
www.theage.com.au.	36	IN	CNAME	dsa.f2.com.au.edgesuite.net.
dsa.f2.com.au.edgesuite.net. 21337 IN	CNAME	a1040.g.akamai.net.
a1040.g.akamai.net.	20	IN	A	193.219.194.8
a1040.g.akamai.net.	20	IN	A	193.219.194.11

;; AUTHORITY SECTION:
g.akamai.net.		1276	IN	NS	n7g.akamai.net.
g.akamai.net.		1276	IN	NS	n8g.akamai.net.
g.akamai.net.		1276	IN	NS	n0g.akamai.net.
g.akamai.net.		1276	IN	NS	n1g.akamai.net.
g.akamai.net.		1276	IN	NS	n2g.akamai.net.
g.akamai.net.		1276	IN	NS	n3g.akamai.net.
g.akamai.net.		1276	IN	NS	n4g.akamai.net.
g.akamai.net.		1276	IN	NS	n5g.akamai.net.
g.akamai.net.		1276	IN	NS	n6g.akamai.net.

;; Query time: 1 msec
;; SERVER: 193.219.193.135#53(dns.taide.net)
;; WHEN: Tue Aug 16 16:15:57 2011
;; MSG SIZE  rcvd: 299
  
The traceroute to 193.219.194.8 is
 
traceroute to 193.219.194.8 (193.219.194.8), 30 hops max, 38 byte packets
 1  NO-NIT-VN-15 (193.219.193.115)  0.385 ms  0.237 ms  0.331 ms
 2  NO-NIT-TN-2 (193.219.193.132)  0.498 ms  0.403 ms  0.401 ms
 3  193.219.194.8 (193.219.194.8)  0.296 ms  0.246 ms  0.404 ms

USA

; <<>> DiG 9.3.2-P2.1 <<>> any www.theage.com.au
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18494
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.theage.com.au.		IN	ANY

;; ANSWER SECTION:
www.theage.com.au.	256	IN	CNAME	dsa.f2.com.au.edgesuite.net.
dsa.f2.com.au.edgesuite.net. 21556 IN	CNAME	a1040.g.akamai.net.
a1040.g.akamai.net.	20	IN	A	173.223.52.154
a1040.g.akamai.net.	20	IN	A	173.223.52.169

;; Query time: 1 msec
;; SERVER: 204.152.204.100#53(204.152.204.100)
;; WHEN: Tue Aug 16 08:28:34 2011
;; MSG SIZE  rcvd: 137
 

Traceroute Results:

 1  10.31.6.1 (10.31.6.1)  8.040 ms  14.992 ms  10.738 ms
 2  66.63.169.249 (66.63.169.249)  45.798 ms  51.654 ms  0.626 ms
 3  96.44.180.246 (96.44.180.246)  0.485 ms  0.441 ms  0.281 ms
 4  akamai.com.any2ix.coresite.com (206.223.143.82)  0.396 ms  0.361 ms  0.302 ms
 5  a173-223-52-169.deploy.akamaitechnologies.com (173.223.52.169)  0.338 ms  0.248 ms  0.265 ms
 
 


No comments:

Post a Comment