A Gluecon 2017 talk on why section.io uses Kubernetes to build a content delivery network that properly supports agile and devops teams. Demo code is available on github
1. Kubernetes in the Wild
Building a
Content Delivery Network
on Kubernetes
Daniel Bartholomew, CTO, section.io
2. What to expect from this talk
Drastic oversimplifications
Opinionated statements
Errors and omissions
Tempting fate - Live code!
3. What are we going to cover?
Some background on CDN design
Some Kubernetes concepts
Live Demo using Nginx, Varnish and
(maybe) OpenResty
4. What makes up a CDN??
1. Physical Layer: computers, network,
global locations
2. Logical Layer: HTTP reverse proxies
5. Why would Kubernetes fit this model?
Kubernetes provides an elegant
framework for running lots of
workloads.
For CDN, the logical layer.
6. Just f’ing hardcode it!!?
Most CDNs hardcode specific proxies
into their network
We think that this reduces architectural
options, leading to suboptimal systems
7. Focus has shifted
CDNs used to provide a big boost just
on the physical layer
Now CDNs operate more in the logical
layer
8. Why is that important?
Moving to the logical layer started to
have effects on the application
But the CDN isn’t part of the
development environment
9.
10. Desired state
Provide a CDN that supports:
Architecture - freedom of choice
Agile - in dev, CI, CD
Devops - dev works like prod
11. Architectural options
Don't hardcode the proxies
Provide a library to developers. Choose
from caching, security, optimization.
Mix and match to suit.
12. Agile
Provide a source controlled workflow
to move code and configuration from
development through to production.
Assert outcomes along the way.
13. The devops thing
Provide consistency in process
Move CDN from “ops only” to dev
Debug production like you do in dev
14. Why Kubernetes?
Kubernetes provides all the basic
components to serve HTTP traffic
HTTP Ingress
Run HTTP servers inside containers
Control linking containers together in the cluster