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

Building a Simple Content Delivery Network

Building a Simple Content Delivery Network

This is from a Boston.io talk I gave on how web requests work, how content delivery networks work, and how to build a simple network to serve up ASCII images of marsupials!

Code is here: https://github.com/bschwartz/marsupial-graphics

Brendan Schwartz

February 17, 2014
Tweet

More Decks by Brendan Schwartz

Other Decks in Technology

Transcript

  1. DNS Query TCP Connection SSL Channel HTTP Request CLIENT HELLO

    SERVER HELLO CLIENT SERVER CLIENT KEY CHANGE CIPHER
  2. <html> <head> <title>This is typical</title> <script src=“http://here.com/jquery.js”></script> <script src=“http://there.com/underscore.js”></script> <script

    src=“http://everywhere.com/angular.js”></script> <script src=“http://somewhere.com/emoji.js”></script> <script src=“http://nowhere.com/analytics.js”></script> </head> <body> <h1>This is a web page!</h1> </body> </html>
  3. 1. Get HTML page 2. Get assets (scripts, stylesheets, images)

    HTTP: 4 round trips = 1,064 ms HTTPS: 8 round trips = 2,128 ms!