Explain what is a CDN, its advantages, and how to exploit caching on the internet. I cover Akamai in specific, along practices around Cache Headers, Cookie less domains, Fingerprinting, etc.
This talk was delivered at GIDS Bangalore (Apr 2015).
Gurpreet LuthraLead Consultant and Community Lead (Bahmni) at ThoughtWorks
2. Agenda
• What is a CDN?
• Brief on Akamai
• Advantages of a CDN
• Exploiting Caching
• Statistics & Numbers
• Architectural Considerations
• Further References
3. About Me - Gurpreet Luthra
• 13+ years, Developer & Lead Consultant
• Working on Scala
• Spent last few months harnessing Akamai
• Twitter: _zenx_
4. What is a CDN?
http://my-retail-store.com (GET)
5. What is a CDN?
Hash
Table
Cache for all your HTTP Get Requests
http://my-retail-store.com (GET)
6. What is a CDN?
Ha
Spread them all over the World!
Ha
Ha
Ha
Ha
Ha
Ha
ORIGIN
7. CDN Distribution Scheme
"NCDN - CDN" by Kanoha - Own work. Licensed under CC BY-SA 3.0 via Wikimedia Commons
http://commons.wikimedia.org/wiki/File:NCDN_-_CDN.png#/media/File:NCDN_-_CDN.png
10. • 15-30% of all Web Traffic
• $1.96 Billion Annual Revenue
• 5000+ employees
• 170,000 Servers in 102 countries
• 2 trillion daily Internet interactions
http://www.akamai.com/html/about/facts_figures.html
21. Recap — Why CDN?
• Caching: Reduced Page Construction Time
• Closer: Reduced Latency
• Traffic Offloaded: Reduced Loads
• Backup: Served even if site is down
• Protection: Prevent DoS Attacks
• Others: Redirects/Auto-compression/Best-route
detection
23. Types of Caches on the Internet
• Web browser
• Proxy
• CDNs
• Reverse Proxies
• Web Server’s / Specialized Caches
24. What would we love?
• Cache Forever
• Deploy immediately
34. Cookie-less Domain
• Why submit cookies for every GET request
for assets?
http://my-assets-host.com/css/
global-908e25f4bf641868d8683022a5b62f54.css