Harnessing The Power of CDNs
- 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
- 12. How do I know if a website is
using Akamai?
12
- 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
- 34. Cookie-less Domain
• Why submit cookies for every GET request
for assets?
http://my-assets-host.com/css/
global-908e25f4bf641868d8683022a5b62f54.css
- 36. Impact on one Website
• 85% - 90% Traffic offloaded to Akamai
• MONTH
• Assets: 100 GB (3KB Cookie)
• Assets: 16 Million requests
• Traffic: 47 TB (Akamai)
• Traffic: 4 TB (Origin)
• Peak: 742 Hits/sec (Akamai)
• Peak: 47 Hits/sec (Origin)
- 39. Further References
• The minimum about Web caching you should know: https://
www.mnot.net/cache_docs
• http://www.mobify.com/blog/beginners-guide-to-http-cache-
headers/
• http://guides.rubyonrails.org/asset_pipeline.html
• http://www.ietf.org/rfc/rfc2616.txt (Section 14.9)
• http://ocw.mit.edu/courses/mathematics/18-996-topics-in-
theoretical-computer-science-internet-research-problems-
spring-2002/lecture-notes/
• http://www.akamai.com/dl/technical_publications/
GloballyDistributedContentDelivery.pdf
• Image Credits: http://publicdomainvectors.org/