Networking & Security for Containers with BPF & XDP
Docker Distributed Systems Summit
Thomas Graf
The Network becomes the Application bus
We have to deal with networks that ...
Cilium Architecture
What is BPF?
BPF Code Generation at Container Startup
Make all tasks globally addressable on the Internet!
Scaling Policy Specification
Frontend
Backend
LB
FE
BE
LB
LB
FE
FE
BE
LB
Scaling Policy Specification
Frontend
Backend
LB
FE
BE
LB
LB
FE
FE
BE
LB
Prod
Frontend
Backend
LB
FE
BE
LB
QA
Prod
QA
Prod
requires
requires
QA
QA
Scaling Policy Enforcement
FE
BE
LB
Prod
QA
Prod
Prod
FE
BE
LB
QA
QA
10
11
12
13
14
15
16
Cluster Wide Label ID Table:
This ID is carried in the network packet and used to reconstruct the label context at the receiving host.
Policy enforcement cost is reduced to a single hashtable lookup regardless of complexity.
Safety & Extensibility in the Kernel
Scaling the Delivery of Cat Videos
FE
BE
LB
LB
ECMP
FE
FE
BE
BE
BE
Small HTTP GET�
Ultra HD Cat Pictures/Videos
Performance
Intel Xeon 3.5Ghz Sandy Bridge, 24 cores,
1 TCP flow per core, netperf -t TCP_SENDFILE, 10’000 policies
Demo
Q&A
Start hacking on BPF for containers:�https://github.com/cilium/cilium��Slack: Twitter�cilium.slack.com @tgraf__
Building Blocks