Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Adventures of the packet: Web Edition

Adventures of the packet: Web Edition

How far would you have to travel to deliver just one packet to a server when you type in their web address? We’ll explore the journey a single packet takes from the browser address bar, to the server, and back. You’ll see just how many services, protocols, and systems are involved in delivering those oh so cute cat videos to your browser each day.

Aaron Kalin

August 07, 2014
Tweet

More Decks by Aaron Kalin

Other Decks in Technology

Transcript

  1. DNS Internet Ý Server Browser Local Cache ISP Router ƃ

    Registry Ɠ Registrar dnsimple.com. A IN
  2. DNS Internet Ý Server Browser Local Cache ISP Router ƃ

    Registry Ɠ Registrar dnsimple.com. A IN
  3. DNS Internet Ý Server Browser Local Cache ISP Router ƃ

    Registry Ɠ Registrar Nameserver dnsimple.com. A IN
  4. DNS Internet Ý Server Browser Local Cache ISP Router ƃ

    Registry Ɠ Registrar Nameserver dnsimple.com. A IN
  5. DNS Internet Ý Server Browser Local Cache ISP Router ƃ

    Registry Ɠ Registrar Nameserver dnsimple.com. 3600 IN A 50.31.209.238
  6. DNS Internet Ý Server Browser Speed! No “guarantee” of delivery

    Commonly used in video games and DNS queries User Datagram Protocol
  7. DNS Internet Ý Server Browser Transmission Control Protocol Slower than

    UDP “Handshake” overhead Uses “Flow Control” to guarantee delivery
  8. DNS Internet Ý Server Browser Border Gateway Protocol Lets ISPs

    share their network routes Lets the router figure out the next destination to hand off the packet
  9. DNS Internet Ý Server Browser Computer Ý Server Internet GET

    / HTTP/1.1 Accept: text/html Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US Connection: keep-alive DNT: 1
  10. DNS Internet Ý Server Browser GET / HTTP/1.1 Accept: text/html

    Accept-Encoding: gzip,deflate,sdch Request & Request Headers
  11. DNS Internet Ý Server Browser GET / HTTP/1.1 Accept: text/html

    Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US Request & Request Headers
  12. DNS Internet Ý Server Browser GET / HTTP/1.1 Accept: text/html

    Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US Connection: keep-alive Request & Request Headers
  13. DNS Internet Ý Server Browser GET / HTTP/1.1 Accept: text/html

    Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US Connection: keep-alive Host: dnsimple.com Request & Request Headers
  14. DNS Internet Ý Server Browser GET / HTTP/1.1 Accept: text/html

    Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US Connection: keep-alive Host: dnsimple.com User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36 Request & Request Headers
  15. DNS Internet Ý Server Browser HTTP/1.1 200 OK Server: nginx

    Date: Thu, 07 Aug 2014 05:00:03 GMT Response & Response Headers
  16. DNS Internet Ý Server Browser HTTP/1.1 200 OK Server: nginx

    Date: Thu, 07 Aug 2014 05:00:03 GMT Content-Type: text/html; charset=utf-8 Response & Response Headers
  17. DNS Internet Ý Server Browser HTTP/1.1 200 OK Server: nginx

    Date: Thu, 07 Aug 2014 05:00:03 GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Response & Response Headers
  18. DNS Internet Ý Server Browser HTTP/1.1 200 OK Server: nginx

    Date: Thu, 07 Aug 2014 05:00:03 GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Connection: close Response & Response Headers
  19. DNS Internet Ý Server Browser HTTP/1.1 200 OK Server: nginx

    Date: Thu, 07 Aug 2014 05:00:03 GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Connection: close Status: 200 OK Response & Response Headers
  20. DNS Internet Ý Server Browser HTTP/1.1 200 OK Server: nginx

    Date: Thu, 07 Aug 2014 05:00:03 GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Connection: close Status: 200 OK Strict-Transport-Security: max-age=631138519 Response & Response Headers
  21. DNS Internet Ý Server Browser Rinse & Repeat Download the

    HTML document and begin parsing for information
  22. DNS Internet Ý Server Browser Rinse & Repeat Download the

    HTML document and begin parsing for information Create new connections (or use existing) to keep fetching stylesheets, javascript, images, video, music, etc.
  23. Resources & Credits TCP/IP Illustrated Volume 1 http://amzn.to/X3vOag Color Palette

    http://goo.gl/iOuuP9 Like my driving? http://bit.do/packet-adventure-rate Icons FontAwesome