why care about a cdn?
TRANSCRIPT
![Page 1: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/1.jpg)
1
Workshops and Conference: May 9-11, 2016
2016
Stockholm
Let us know
what you think!
Click “Engage”to rate a session.If you rate 12 sessionsyou get a cool GOTO prize!
![Page 2: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/2.jpg)
Why the fuck care about a CDN? Artur Bergman, CEO/Founder, Fastly
![Page 3: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/3.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• CEO && Founder • Wikia CTO• SixApart/LiveJournal• Velocity conference• Opensource developer• From Stockholm!
• @crucially
Artur Bergman
![Page 4: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/4.jpg)
© 2016 All rights reservedGoto Stockholm 2016
2008 @ Wikia
![Page 5: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/5.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• 5 years old• San Francisco HQ• London, Tokyo, New York, Denver• 270 employees
Fastly
![Page 6: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/6.jpg)
© 2016 All rights reservedGoto Stockholm 2016
HTTP? use a CDN
![Page 7: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/7.jpg)
© 2016 All rights reservedGoto Stockholm 2016
CDN??
![Page 8: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/8.jpg)
© 2016 All rights reservedGoto Stockholm 2016
![Page 9: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/9.jpg)
© 2016 All rights reservedGoto Stockholm 2016
"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C Clarke
![Page 10: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/10.jpg)
© 2016 All rights reservedGoto Stockholm 2016
"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C Clarke
"Any technology that is indistinguishable from magic for you is one you don't understand"
-- Artur Bergman
![Page 11: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/11.jpg)
© 2016 All rights reservedGoto Stockholm 2016
No Magic
![Page 12: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/12.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• nginx• haproxy• squid• varnish• apache mod_proxy• apache traffic server• ELB• F5 (terrible)
Reverse proxy
![Page 13: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/13.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• offloads TLS• load balances• long running connections• rule based dispatch
Reverse proxy
Client Reverse proxy
App server
App server
App server
![Page 14: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/14.jpg)
© 2016 All rights reservedGoto Stockholm 2016
CDN
Client
Reverse proxy
App server
App server
App server
Reverse proxy
Reverse proxy
Reverse proxy
Reverse proxy
Reverse proxy
![Page 15: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/15.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client
App server
![Page 16: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/16.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• offloads TLS• load balances• long running connections• rule based dispatch• cache (pass through)
Caching reverse proxy
Client Reverse proxy
App server
App server
App serverBig awesome cache
![Page 17: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/17.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client
App server
![Page 18: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/18.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client
App server
![Page 19: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/19.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• 2x 2697v4 18+18 cores • 768 GB RAM (12 TB)• 48 TB of SSD (786 TB)• 40 Gbit/ethernet (640 Gbit)
• 16 per rack
Big awesome cache
Love the future
![Page 20: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/20.jpg)
© 2016 All rights reservedGoto Stockholm 2016
User
DNS
CDN Pop
Origin
![Page 21: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/21.jpg)
© 2016 All rights reservedGoto Stockholm 2016
User
DNS
CDN Pop
Origin
![Page 22: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/22.jpg)
© 2016 All rights reservedGoto Stockholm 2016
User
DNS
CDN Pop
Origin
![Page 23: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/23.jpg)
© 2016 All rights reservedGoto Stockholm 2016
User
DNS
CDN Pop
Origin
Cache miss
![Page 24: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/24.jpg)
© 2016 All rights reservedGoto Stockholm 2016
User
DNS
CDN Pop
Origin
Cache miss
![Page 25: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/25.jpg)
© 2016 All rights reservedGoto Stockholm 2016
User
DNS
CDN Pop
Origin
Cache miss
![Page 26: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/26.jpg)
© 2016 All rights reservedGoto Stockholm 2016
User
DNS
CDN Pop
Origin
Cache hit
![Page 27: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/27.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Like memcache/redis• Except
• Outside your datacenter• Passthrough• Close to user
Inside-out cache
![Page 28: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/28.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• My content is• Private• Unique• Un-cacheable• Special snow flake
But but but
![Page 29: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/29.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• My content is• Private• Unique• Un-cacheable• Special snow flake
But but butYeah right!
Don’t worry
![Page 30: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/30.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Why?
![Page 31: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/31.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Performance Security
Availability
![Page 32: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/32.jpg)
© 2016 All rights reservedGoto Stockholm 2016
![Page 33: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/33.jpg)
© 2015 All rights reservedThe Future of Content DeliveryThe Future of Content Delivery
![Page 34: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/34.jpg)
© 2015 All rights reservedThe Future of Content DeliveryThe Future of Content Delivery
Latency is a measure of time delay experienced in a system, the precise definition of which depends on the system and the time being measured. In communications, the lower limit of latency is determined by the medium being used for communications.
AKA waiting for shit.
Latency is the little-death that bring total obliteration
![Page 35: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/35.jpg)
© 2015 All rights reservedThe Future of Content DeliveryThe Future of Content Delivery
299 792 458 m / s
![Page 36: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/36.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Fastly
Cache it locally
![Page 37: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/37.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Performance Security
Availability
![Page 38: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/38.jpg)
© 2016 All rights reservedGoto Stockholm 2016
?????
![Page 39: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/39.jpg)
© 2016 All rights reservedGoto Stockholm 2016
160 Gbps DDOS
![Page 40: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/40.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Layer 3/4 DDOS protection• UDP/ICMP/SYN
• Layer 7 DDOS protection• Inspect http traffic• Block/Redirect
• Instant visibility in edge traffic• Edge firewall rules
Security
![Page 41: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/41.jpg)
© 2016 All rights reservedGoto Stockholm 2016
![Page 42: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/42.jpg)
© 2016 All rights reservedGoto Stockholm 2016
![Page 43: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/43.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYNfromChina!
![Page 44: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/44.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Outsource your emotional burden• More capacity than attacker is all that matters• Distributed capacity• Largest seen
• > 200 million packets per second• > 400 Gbps
• If it is cached, its easy to serve very high request rate
A word on DDOS
![Page 45: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/45.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Performance Security
Availability
![Page 46: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/46.jpg)
© 2016 All rights reservedGoto Stockholm 2016
DDOS?
![Page 47: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/47.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Prince died :(
![Page 48: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/48.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Prince died :( 140k rps
16k rps
![Page 49: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/49.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Prince died :( 140k rps
16k rps
autoscale lol!
![Page 50: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/50.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• CDN handles entire spike• news sites• download sites• cache it and it doesn’t matter
• stale-if-error• stale-while-revalidate
No origin load
![Page 51: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/51.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Fastly• Telia• NTT• Cogent• Comcast• Level3• + Peering
CDNs have many ISPs
![Page 52: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/52.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• “Faster than the internet”• “Route around problems”
• Continuously choose the best path • Between customer and us• Between us and origin
CDNs have many ISPs
![Page 53: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/53.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Beat speed of light• Move data close to the user• Personalize the data close to the user• Defend against attacks close to the attacker
• DDOS is ever growing thread
• Only way to expand into new markets without significant capital or operational outlay and risk
Do things at the edge
![Page 54: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/54.jpg)
© 2016 All rights reservedGoto Stockholm 2016
you use all the time
![Page 55: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/55.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Python Software Foundation• NPM• Ruby Core• Ruby Gems• Metacpan• MIT Scratch• kernel.org
opensource
![Page 56: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/56.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Hashicorp• New Relic• Maven• Github• Package cloud
• Check your build systems firewall log :)
developer tools
![Page 57: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/57.jpg)
© 2016 All rights reservedGoto Stockholm 2016
why do you care? about future of CDN
![Page 58: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/58.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• My content is• Private• Unique• Un-cacheable• Special snow flake
But but butYeah right!
Don’t worry
![Page 59: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/59.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Dynamic Site Acceleration • Not just magic lies
• TCP• HTTP• TLS
![Page 60: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/60.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 100 ms
![Page 61: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/61.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 100 msSYNACK 100 ms
![Page 62: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/62.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 100 msSYNACK 100 msTLS HS 100 ms
![Page 63: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/63.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 100 msSYNACK 100 msTLS HS 100 msTLS HS 100 ms
![Page 64: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/64.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 100 msSYNACK 100 msTLS HS 100 msTLS HS 100 msRequest 100 ms
![Page 65: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/65.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 100 msSYNACK 100 msTLS HS 100 msTLS HS 100 msRequest 100 msResponse 100 ms
![Page 66: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/66.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 100 msSYNACK 100 msTLS HS 100 msTLS HS 100 msRequest 100 msResponse 100 ms
Total 600 ms to slow start
![Page 67: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/67.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 20 msSYNACK 20 msTLS HS 20 msTLS HS 20 msRequest 20 msResponse 20 ms
![Page 68: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/68.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 20 msSYNACK 20 msTLS HS 20 msTLS HS 20 msRequest 20 msResponse 20 ms
Request 100 msResponse 100 ms
![Page 69: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/69.jpg)
© 2016 All rights reservedGoto Stockholm 2016
SYN 20 msSYNACK 20 msTLS HS 20 msTLS HS 20 msRequest 20 msResponse 20 ms
Request 100 msResponse 100 ms
Total 320 ms and no slow start
![Page 70: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/70.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Location based• Time based• Changes based on user or machine input
• Separate public and private APIs• Reuse on mobile and progressive web apps
Usually cacheable
![Page 71: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/71.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Instant purge (cache-invalidation)• Instant configuration• Instant stats• Instant logs• Edge dictionaries
• Very large edge caches == higher hit rate
Key developer friendly features
![Page 72: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/72.jpg)
© 2016 All rights reservedGoto Stockholm 2016
curl -X PURGE https://www.fastly.com/
• 150 ms to purge world wide• dramatically changes what you can cache if you can invalidate
Instant purge
![Page 73: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/73.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Instant purge• News articles• Inventory data• Sport scores• Wikis• Blogs• API metadata
![Page 74: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/74.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Surrogate-Key invalidationSurrogate-Key: tag1 tag2 tag3
• Purge by tag• All objects matching tag gets wipe
• let us handle the cache dependencies (secondary index)• track collections by objects that went into them
![Page 75: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/75.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Instant config• Varnish VCL• 100% API accesible• Deploy around the world in 5 seconds
• Load balancing rules• IP blocks• Custom edge logic
![Page 76: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/76.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Instant logfiles• Streaming log files (1-2 seconds delay)
• syslog• S3/GCS• Fluentd• Splunk• elk
• We don’t store any logs on a permanent basis
![Page 77: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/77.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Instant stats• Realtime stream• Hook into your alerting for instant notice on bad deploys
![Page 78: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/78.jpg)
© 2016 All rights reservedGoto Stockholm 2016
![Page 79: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/79.jpg)
© 2016 All rights reservedGoto Stockholm 2016
![Page 80: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/80.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Programmatic edge• Load balance between cloud providers
• (get rid of your load balancers)• Route to different services based on any attribute in the
request• Handle failover• Edge authentication using edge dictionaries (key-value store)• Offload offload offload
![Page 81: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/81.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
![Page 82: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/82.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
![Page 83: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/83.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
![Page 84: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/84.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
Segmentation Service
Authentication headers provided
![Page 85: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/85.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
Segmentation Service
![Page 86: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/86.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
Segmentation Service
API service
Authentication + Segmentation headers provided
![Page 87: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/87.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
Segmentation Service
API service
![Page 88: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/88.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
Segmentation Service
API service
![Page 89: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/89.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
Segmentation Service
API service
Cacheable
Cacheable
![Page 90: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/90.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
Segmentation Service
API service
Second request
![Page 91: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/91.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Client Fastly
Authentication service
Segmentation Service
API service
Revoke access Send surrogate-key purge for user
![Page 92: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/92.jpg)
© 2016 All rights reservedGoto Stockholm 2016
HOW??
![Page 93: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/93.jpg)
© 2016 All rights reservedGoto Stockholm 2016
1. The network is reliable.2. Latency is zero.3. Bandwidth is infinite.4. The network is secure.5. Topology doesn't change.6. There is one administrator.7. Transport cost is zero.8. The network is homogeneous.
Fallacies of distributed systems
![Page 94: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/94.jpg)
© 2016 All rights reservedGoto Stockholm 2016
1. The network is reliable.2. Latency is zero.3. Bandwidth is infinite.4. The network is secure.5. Topology doesn't change.6. There is one administrator.7. Transport cost is zero.8. The network is homogeneous.
At Fastly
![Page 95: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/95.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Very little off the shelf software works for us• Most software written for 2-3 nearby datacenter• No virtualization
• Most things not written for our scale (up)
• Apparently few people continuously push 20 Gbps/server
Technologies
![Page 96: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/96.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• haproxy (TLS termination)• h2o (http2)• varnish (caching)• bird (bgp daemon)• knot (dns daemon)• ubuntu linux
• C / Go / Ruby mix
Technologies
![Page 97: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/97.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Hate specific built hardware• Routers• Load balancers• Firewalls
• Arista / Cumulus • Linux on a switch with an API• BGP on the caches themselves• Treat it all as code
Networking
![Page 98: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/98.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Purging based on bimodal multicast• Other services rely on purging
• Example config push => purge => fetch of new config
• Need to be extremely resilient in face of the internet
Coordination Technologies
![Page 99: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/99.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Physical hardware for forwarding plane
• Google Bigtable/Bigquery for analytics• AWS for control plane• Datadog for monitoring
Providers
![Page 100: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/100.jpg)
© 2016 All rights reservedGoto Stockholm 2016
• Varnish on AWS around the world• Route53 to send to closest user
• You have a simple CDN!
Just! build your own
![Page 101: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/101.jpg)
© 2016 All rights reservedGoto Stockholm 2016
EITHER WAY USE ONE
![Page 102: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/102.jpg)
© 2016 All rights reservedGoto Stockholm 2016
Thank you!
![Page 103: Why care about a CDN?](https://reader031.vdocuments.net/reader031/viewer/2022030300/58808ce11a28ab35718b6e11/html5/thumbnails/103.jpg)
=
103
Workshops and Conference: May 9-11, 2016
2016
Stockholm
Please remember torate this session
...Thank You!