0
Doing
           Horrible Things
              to DNS
            (in the name of science)




@sh1mmer                   ...
The basics of DNS
San Francisco - Mission Branch
San Francisco - Main Library
New York City - 5th & 42nd Branch
New York City - 5th & 42nd Branch
NYC




San Francisco - Main Library
San Francisco - Main Library
NYC

 SF




San Francisco - Mission Branch
San Francisco - Mission Branch
NYC

  SF

Mission
NYC

  SF

Mission

  Me
GTFO!
It's 3am!
DNS for performance
Page Load Time vs. Bandwidth
Page Load Time vs. Round Trip Time
Trend Curves for Bandwidth vs. RTT
Serial HTTP loading - 1 domain
Parallel HTTP loading - 3 domains
So why not just use a loads of domains?
DNS Lookup
Ideal? 1 DNS query many parallel threads
Option 1: SPDY (by Google)
Good: Multi-thread TCP connections
   Bad: Only works on Chrome :(
Option 2: Do horrible things to DNS
Mucking about with C names
CNAMES are hosts which
are aliases of other hosts
enki:~ $ dig yahoo.com

; <<>> DiG 9.4.3-P3 <<>> yahoo.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opco...
ajax1.hackerhouse.org.   1800   IN   CNAME   ajax2.hackerhouse.
ajax2.hackerhouse.org.   1800   IN   CNAME   ajax3.hackerh...
We now have 5 hostnames with 1 DNS query
5 hostnames x 6 request per host
                 =
       30 parallel requests
Doing
           Horrible Things
              to DNS
            (in the name of science)


           Questions?
@sh1mme...
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
Upcoming SlideShare
Loading in...5
×

Doing Horrible Things with DNS - Web Directions South

4,241

Published on

How can we make use of DNS to improve the performance of web sites? A simple introduction to DNS and a neat trick to improve web site performance using DNS.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,241
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
28
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Doing Horrible Things with DNS - Web Directions South"

  1. 1. Doing Horrible Things to DNS (in the name of science) @sh1mmer Yahoo! Inc
  2. 2. The basics of DNS
  3. 3. San Francisco - Mission Branch
  4. 4. San Francisco - Main Library
  5. 5. New York City - 5th & 42nd Branch
  6. 6. New York City - 5th & 42nd Branch
  7. 7. NYC San Francisco - Main Library
  8. 8. San Francisco - Main Library
  9. 9. NYC SF San Francisco - Mission Branch
  10. 10. San Francisco - Mission Branch
  11. 11. NYC SF Mission
  12. 12. NYC SF Mission Me
  13. 13. GTFO! It's 3am!
  14. 14. DNS for performance
  15. 15. Page Load Time vs. Bandwidth
  16. 16. Page Load Time vs. Round Trip Time
  17. 17. Trend Curves for Bandwidth vs. RTT
  18. 18. Serial HTTP loading - 1 domain
  19. 19. Parallel HTTP loading - 3 domains
  20. 20. So why not just use a loads of domains?
  21. 21. DNS Lookup
  22. 22. Ideal? 1 DNS query many parallel threads
  23. 23. Option 1: SPDY (by Google)
  24. 24. Good: Multi-thread TCP connections Bad: Only works on Chrome :(
  25. 25. Option 2: Do horrible things to DNS
  26. 26. Mucking about with C names
  27. 27. CNAMES are hosts which are aliases of other hosts
  28. 28. enki:~ $ dig yahoo.com ; <<>> DiG 9.4.3-P3 <<>> yahoo.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32801 ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 7, ADDITIONAL: 7 ;; QUESTION SECTION: ;yahoo.com. IN A Query ;; ANSWER SECTION: yahoo.com. 5935 IN A 69.147.125.65 yahoo.com. 5935 IN A 72.30.2.43 yahoo.com. 5935 IN A 98.137.149.56 yahoo.com. yahoo.com. 5935 5935 IN IN A A 209.191.122.70 67.195.160.76 Response ... ;; Query time: 45 msec ;; SERVER: 202.171.190.10#53(202.171.190.10) ;; WHEN: Wed Oct 13 17:23:39 2010 ;; MSG SIZE rcvd: 345
  29. 29. ajax1.hackerhouse.org. 1800 IN CNAME ajax2.hackerhouse. ajax2.hackerhouse.org. 1800 IN CNAME ajax3.hackerhouse. ajax3.hackerhouse.org. 1800 IN CNAME ajax4.hackerhouse. ajax4.hackerhouse.org. 1800 IN CNAME ajax.hackerhouse. ajax.hackerhouse.org. 1800 IN A 192.168.1.1 ajax.hackerhouse.org. 1800 IN A 192.168.1.2 ajax.hackerhouse.org. 1800 IN A 192.168.1.3 ajax.hackerhouse.org. 1800 IN A 192.168.1.4 ajax.hackerhouse.org. 1800 IN A 192.168.1.5
  30. 30. We now have 5 hostnames with 1 DNS query
  31. 31. 5 hostnames x 6 request per host = 30 parallel requests
  32. 32. Doing Horrible Things to DNS (in the name of science) Questions? @sh1mmer Yahoo! Inc
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×