SlideShare a Scribd company logo
Project Calico is sponsored by@projectcalico
Sponsored by
Networking in a Containerized Data
Center: the Gotchas!
MICROSERVICES FOR ENTERPRISES MEETUP
Andy Randall | @andrew_randall Palo Alto, March 31, 2016
Project Calico is sponsored by@projectcalico
(n) North American. “an instance of publicly tricking
someone or exposing them to ridicule, especially
by means of an elaborate deception.”
Project Calico is sponsored by@projectcalico
Project Calico is sponsored by@projectcalico
Run anywhere Simple
Lightweight
Standard
Speed
Cloud
Efficient
Project Calico is sponsored by@projectcalico
Project Calico is sponsored by@projectcalico
The original “container approach” to networking
 All containers on a machine share the same IP address
 Gotcha #1:
WWW1
WWW2
80
80
Proxy
8080
8081
Still most container deployments use this method!
Project Calico is sponsored by@projectcalico
World is moving to “IP per container”
Container Network
Interface (CNI)
Container
Network Model
(libnetwork, 0.19)
net-modules (0.26)
(future: CNI?)
Project Calico is sponsored by@projectcalico
We’ve solved “IP per VM” before…
VM
1
VM
2
VM
3
Virtual Switch
Project Calico is sponsored by@projectcalico
We’ve solved “IP per VM” before…
VM
1
VM
2
VM
3
Virtual Switch
VM
1
VM
2
VM
3
Virtual Switch
Project Calico is sponsored by@projectcalico
Consequences for containers (gotcha #2): Scale
Hundreds of servers, low churn Millions of containers, high churn
Project Calico is sponsored by@projectcalico
pHost 1
Virtual Switch /
encapsulation
vNIC
pNIC
vNIC
VM1
Consequences for containers (gotcha #3): Layering
Packets are double encap’d!
Container
A
Container
B
Container
C
Virtual Switch / encapsulation
veth0 veth1 veth2
pHost 2
Virtual Switch /
encapsulation
VM2
Container
D
Container
E
Container
F
Virtual Switch / encapsulation
pNIC
vNIC vNIC
veth0 veth1 veth2
Physical Switch
Project Calico is sponsored by@projectcalico
Consequences for containers (gotcha #4): walled gardens
Legacy App
pHost 1
Virtual Switch /
encapsulation
vNIC
pNIC
vNIC
VM1
Container
A
Container
B
Container
C
Virtual Switch / encapsulation
veth0 veth1 veth2
Physical Switch
Project Calico is sponsored by@projectcalico
“Any intelligent fool can
make things bigger, more
complex… It takes a
touch of genius – and a
lot of courage – to move
in the opposite direction.”
Project Calico is sponsored by@projectcalico
A Saner Approach: just route IP from the container
pHost 1
Virtual underlay
vNIC
pNIC
vNIC
VM1
Container
A
Container
B
Container
C
Linux kernel routing (no encapsulation)
veth0 veth1 veth2
pHost 2
Virtual Underlay
VM2
Container
D
Container
E
Container
F
Linux kernel routing (no encapsulation)
pNIC
vNIC vNIC
veth0 veth1 veth2
Physical Underlay
Project Calico is sponsored by@projectcalico
Variant: 1 vm per host, no virtual underlay, straight-up IP
pHost 1 pNIC
vNIC
VM1
Container
A
Container
B
Container
C
Linux kernel routing (no encapsulation)
veth0 veth1 veth2
pHost 2
VM2
Container
D
Container
E
Container
F
Linux kernel routing (no encapsulation)
pNIC
vNIC
veth0 veth1 veth2
Physical Underlay
Project Calico is sponsored by@projectcalico
Results: bare metal performance from virtual networks
0
1
2
3
4
5
6
7
8
9
10
Bare metal Calico OVS+VXLAN
Throughput Gbps
0
20
40
60
80
100
120
Bare metal Calico OVS+VXLAN
CPU % per Gbps
Source: https://www.projectcalico.org/calico-dataplane-performance/
Project Calico is sponsored by@projectcalico
 Some container frameworks still assume port mapping
 E.g. Marathon load balancer service (but being fixed…)
 Some PaaS’s not yet supporting IP per container
 But several moving to build on Kubernetes, and will likely pick it up
Gotcha #5: IP per container not yet universally supported
Project Calico is sponsored by@projectcalico
 You can easily get your configuration wrong and get sub-
optimal performance, e.g.
 select wrong Flannel back-end for your fabric
 turn off AWS src-dest IP checks
 get MTU size wrong for the underlay…
Gotcha #6: running on public cloud
Project Calico is sponsored by@projectcalico
Consequences of MTU size…
0
50
100
150
200
250
300
t2.micro m4.xlarge
qperf bandwidth
Bare Metal Calico
Project Calico is sponsored by@projectcalico
Consequences of MTU size…
0
50
100
150
200
250
300
t2.micro m4.xlarge
qperf bandwidth
Bare Metal Calico (MTU=1440) Calico (MTU=8980)
Project Calico is sponsored by@projectcalico
 Suppose we assign a /24 per Kubernetes node (=> 254 pods)
 Run 10 VMs per server, each with a Kubernetes node
 40 servers per rack
 20 racks per data center
 4 data centers
 => now need a /15 for the rack, a /10 space for the data center,
and the entire 10/8 rfc1918 range to cover 4 data centers.
 … and hope your business doesn’t expand to need a 5th data
center!
Gotcha #7: IP addresses aren’t infinite
Project Calico is sponsored by@projectcalico
 Kubernetes
 CNI fairly stable
 Fine-grained policy being added – will move from alpha (annotation—
based) to first-class citizen API
 Mesos – multiple ways to network your container
 Net-modules – but only supports Mesos containerizer
 Docker networking – but then not fully integrated e.g. into MesosDNS
 CNI – possible future, but not here today
 Roll-your-own orchestrator-network co-ordination – the approach some of
our users have taken
 Docker
 Swarm / Docker Datacenter still early; libnetwork evolution? policy?
Gotcha #8: orchestration platforms support still evolving
Project Calico is sponsored by@projectcalico
 Docker libnetwork provides limited functionality / visibility to
plug-ins
 E.g. network name you specify as a user is NOT passed to the
underlying SDN
 Consequences:
 Diagnostics hard to correlate
 Hard to enable ”side loaded” commands referring to networks created
on Docker command line (e.g. Calico advanced policy)
 Hard to network between Docker virtual network domain and non-
containerized workloads
Gotcha #9: Docker libnetwork is “special”
Project Calico is sponsored by@projectcalico
 “Can you write a function that tells me when all nodes have
caught up to the global state?”
 Sure…
Gotcha #10: at cloud scale, nothing ever converges
function is_converged()
return false
Project Calico is sponsored by@projectcalico

More Related Content

PDF
'Dockerizing' within enterprises
PDF
Microservices for Enterprises - Consistent Network & Security services for Co...
PPTX
Container Networking: the Gotchas (Mesos London Meetup 11 May 2016)
PPTX
Simple, Scalable and Secure Networking for Data Centers with Project Calico
PPTX
Onug lunch talk may 12 2015 no video
PDF
Clocker, Calico and Docker
PDF
Docker Networking with Project Calico
PDF
Metaswitch Project Calico
'Dockerizing' within enterprises
Microservices for Enterprises - Consistent Network & Security services for Co...
Container Networking: the Gotchas (Mesos London Meetup 11 May 2016)
Simple, Scalable and Secure Networking for Data Centers with Project Calico
Onug lunch talk may 12 2015 no video
Clocker, Calico and Docker
Docker Networking with Project Calico
Metaswitch Project Calico

What's hot (20)

PDF
Simplifying and Securing your OpenShift Network with Project Calico
PDF
How we built Packet's bare metal cloud platform
PDF
Container Networking - State of the Ecosystem [ContainerConf, Mannheim, Nov 2...
PPTX
Intro to Project Calico: a pure layer 3 approach to scale-out networking
PDF
Networking For Nested Containers: Magnum, Kuryr, Neutron Integration
PDF
Let's Talk about Packet
PDF
Docker Enterprise Networking and Cisco Contiv - Cisco Live 2017 BRKSDN-2256
PPTX
Lessons learned from global telecom operators' cloud journeys - Zeev Likworni...
PDF
Container security within Cisco Container Platform
PDF
NYC Docker Meetup: Contiv networking on Docker
PDF
Project calico - introduction
PDF
Triangle Kubernetes Meetup: Container cloud networking - Contiv for K8S & Ope...
PPTX
OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...
PDF
Microservices and containers networking: Contiv, an industry leading open sou...
PPT
Deploying calico on kubernetes
PDF
Overlay/Underlay - Betting on Container Networking
PDF
Openstack Summit: Networking and policies across Containers and VMs
PDF
OpenStack and OpenDaylight: An Integrated IaaS for SDN/NFV
PPTX
Scaling OpenStack Networking Beyond 4000 Nodes with Dragonflow - Eshed Gal-Or...
PDF
Introduction to the Container Networking and Security
Simplifying and Securing your OpenShift Network with Project Calico
How we built Packet's bare metal cloud platform
Container Networking - State of the Ecosystem [ContainerConf, Mannheim, Nov 2...
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Networking For Nested Containers: Magnum, Kuryr, Neutron Integration
Let's Talk about Packet
Docker Enterprise Networking and Cisco Contiv - Cisco Live 2017 BRKSDN-2256
Lessons learned from global telecom operators' cloud journeys - Zeev Likworni...
Container security within Cisco Container Platform
NYC Docker Meetup: Contiv networking on Docker
Project calico - introduction
Triangle Kubernetes Meetup: Container cloud networking - Contiv for K8S & Ope...
OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...
Microservices and containers networking: Contiv, an industry leading open sou...
Deploying calico on kubernetes
Overlay/Underlay - Betting on Container Networking
Openstack Summit: Networking and policies across Containers and VMs
OpenStack and OpenDaylight: An Integrated IaaS for SDN/NFV
Scaling OpenStack Networking Beyond 4000 Nodes with Dragonflow - Eshed Gal-Or...
Introduction to the Container Networking and Security
Ad

Similar to Container Networking Meetup March 31 2016 (20)

PPTX
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
PPTX
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
PDF
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
PPTX
Comparison of existing cni plugins for kubernetes
PPTX
Docker Networking Overview
PDF
Container Networking Deep Dive
PDF
Packet walks in_kubernetes-v4
PPTX
Kubernetes Online Training
PPTX
DockerCon US 2016 - Docker Networking deep dive
PDF
Building a sdn solution for the deployment of web application stacks in docker
PDF
Cilium - Fast IPv6 Container Networking with BPF and XDP
PDF
OSDC 2017 | The evolution of the Container Network Interface by Casey Callend...
PDF
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
PPTX
KubeCon EU 2016: Secure, Cloud-Native Networking with Project Calico
PDF
Container network security
PDF
Practical Design Patterns in Docker Networking
PDF
KubernetesNetworkingAndImplementation-Lecture.pdf
PDF
Docker network performance in the public cloud
PDF
Docker network performance in the public cloud
PDF
Vbrownbag container networking for real workloads
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
Comparison of existing cni plugins for kubernetes
Docker Networking Overview
Container Networking Deep Dive
Packet walks in_kubernetes-v4
Kubernetes Online Training
DockerCon US 2016 - Docker Networking deep dive
Building a sdn solution for the deployment of web application stacks in docker
Cilium - Fast IPv6 Container Networking with BPF and XDP
OSDC 2017 | The evolution of the Container Network Interface by Casey Callend...
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
KubeCon EU 2016: Secure, Cloud-Native Networking with Project Calico
Container network security
Practical Design Patterns in Docker Networking
KubernetesNetworkingAndImplementation-Lecture.pdf
Docker network performance in the public cloud
Docker network performance in the public cloud
Vbrownbag container networking for real workloads
Ad

More from Andrew Randall (6)

PPTX
Why Kubernetes on Azure: Tigera-Microsoft Partnership
PDF
State of cloud and application connectivity
PDF
Preview of “CIOReview - Networking Technology Special 2015”
PDF
A randall powerpresentations
PDF
Ingredients for a Successful Service Innovation Ecosystem
PPT
ONUG Keynote - VoIP Has Just Begun
Why Kubernetes on Azure: Tigera-Microsoft Partnership
State of cloud and application connectivity
Preview of “CIOReview - Networking Technology Special 2015”
A randall powerpresentations
Ingredients for a Successful Service Innovation Ecosystem
ONUG Keynote - VoIP Has Just Begun

Recently uploaded (20)

PDF
Digital Strategies for Manufacturing Companies
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
ai tools demonstartion for schools and inter college
PPTX
history of c programming in notes for students .pptx
PDF
System and Network Administration Chapter 2
PDF
Nekopoi APK 2025 free lastest update
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
Digital Strategies for Manufacturing Companies
Wondershare Filmora 15 Crack With Activation Key [2025
Understanding Forklifts - TECH EHS Solution
Odoo Companies in India – Driving Business Transformation.pdf
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Navsoft: AI-Powered Business Solutions & Custom Software Development
ai tools demonstartion for schools and inter college
history of c programming in notes for students .pptx
System and Network Administration Chapter 2
Nekopoi APK 2025 free lastest update
PTS Company Brochure 2025 (1).pdf.......
2025 Textile ERP Trends: SAP, Odoo & Oracle
Design an Analysis of Algorithms I-SECS-1021-03
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
How to Choose the Right IT Partner for Your Business in Malaysia

Container Networking Meetup March 31 2016

  • 1. Project Calico is sponsored by@projectcalico Sponsored by Networking in a Containerized Data Center: the Gotchas! MICROSERVICES FOR ENTERPRISES MEETUP Andy Randall | @andrew_randall Palo Alto, March 31, 2016
  • 2. Project Calico is sponsored by@projectcalico (n) North American. “an instance of publicly tricking someone or exposing them to ridicule, especially by means of an elaborate deception.”
  • 3. Project Calico is sponsored by@projectcalico
  • 4. Project Calico is sponsored by@projectcalico Run anywhere Simple Lightweight Standard Speed Cloud Efficient
  • 5. Project Calico is sponsored by@projectcalico
  • 6. Project Calico is sponsored by@projectcalico The original “container approach” to networking  All containers on a machine share the same IP address  Gotcha #1: WWW1 WWW2 80 80 Proxy 8080 8081 Still most container deployments use this method!
  • 7. Project Calico is sponsored by@projectcalico World is moving to “IP per container” Container Network Interface (CNI) Container Network Model (libnetwork, 0.19) net-modules (0.26) (future: CNI?)
  • 8. Project Calico is sponsored by@projectcalico We’ve solved “IP per VM” before… VM 1 VM 2 VM 3 Virtual Switch
  • 9. Project Calico is sponsored by@projectcalico We’ve solved “IP per VM” before… VM 1 VM 2 VM 3 Virtual Switch VM 1 VM 2 VM 3 Virtual Switch
  • 10. Project Calico is sponsored by@projectcalico Consequences for containers (gotcha #2): Scale Hundreds of servers, low churn Millions of containers, high churn
  • 11. Project Calico is sponsored by@projectcalico pHost 1 Virtual Switch / encapsulation vNIC pNIC vNIC VM1 Consequences for containers (gotcha #3): Layering Packets are double encap’d! Container A Container B Container C Virtual Switch / encapsulation veth0 veth1 veth2 pHost 2 Virtual Switch / encapsulation VM2 Container D Container E Container F Virtual Switch / encapsulation pNIC vNIC vNIC veth0 veth1 veth2 Physical Switch
  • 12. Project Calico is sponsored by@projectcalico Consequences for containers (gotcha #4): walled gardens Legacy App pHost 1 Virtual Switch / encapsulation vNIC pNIC vNIC VM1 Container A Container B Container C Virtual Switch / encapsulation veth0 veth1 veth2 Physical Switch
  • 13. Project Calico is sponsored by@projectcalico “Any intelligent fool can make things bigger, more complex… It takes a touch of genius – and a lot of courage – to move in the opposite direction.”
  • 14. Project Calico is sponsored by@projectcalico A Saner Approach: just route IP from the container pHost 1 Virtual underlay vNIC pNIC vNIC VM1 Container A Container B Container C Linux kernel routing (no encapsulation) veth0 veth1 veth2 pHost 2 Virtual Underlay VM2 Container D Container E Container F Linux kernel routing (no encapsulation) pNIC vNIC vNIC veth0 veth1 veth2 Physical Underlay
  • 15. Project Calico is sponsored by@projectcalico Variant: 1 vm per host, no virtual underlay, straight-up IP pHost 1 pNIC vNIC VM1 Container A Container B Container C Linux kernel routing (no encapsulation) veth0 veth1 veth2 pHost 2 VM2 Container D Container E Container F Linux kernel routing (no encapsulation) pNIC vNIC veth0 veth1 veth2 Physical Underlay
  • 16. Project Calico is sponsored by@projectcalico Results: bare metal performance from virtual networks 0 1 2 3 4 5 6 7 8 9 10 Bare metal Calico OVS+VXLAN Throughput Gbps 0 20 40 60 80 100 120 Bare metal Calico OVS+VXLAN CPU % per Gbps Source: https://www.projectcalico.org/calico-dataplane-performance/
  • 17. Project Calico is sponsored by@projectcalico  Some container frameworks still assume port mapping  E.g. Marathon load balancer service (but being fixed…)  Some PaaS’s not yet supporting IP per container  But several moving to build on Kubernetes, and will likely pick it up Gotcha #5: IP per container not yet universally supported
  • 18. Project Calico is sponsored by@projectcalico  You can easily get your configuration wrong and get sub- optimal performance, e.g.  select wrong Flannel back-end for your fabric  turn off AWS src-dest IP checks  get MTU size wrong for the underlay… Gotcha #6: running on public cloud
  • 19. Project Calico is sponsored by@projectcalico Consequences of MTU size… 0 50 100 150 200 250 300 t2.micro m4.xlarge qperf bandwidth Bare Metal Calico
  • 20. Project Calico is sponsored by@projectcalico Consequences of MTU size… 0 50 100 150 200 250 300 t2.micro m4.xlarge qperf bandwidth Bare Metal Calico (MTU=1440) Calico (MTU=8980)
  • 21. Project Calico is sponsored by@projectcalico  Suppose we assign a /24 per Kubernetes node (=> 254 pods)  Run 10 VMs per server, each with a Kubernetes node  40 servers per rack  20 racks per data center  4 data centers  => now need a /15 for the rack, a /10 space for the data center, and the entire 10/8 rfc1918 range to cover 4 data centers.  … and hope your business doesn’t expand to need a 5th data center! Gotcha #7: IP addresses aren’t infinite
  • 22. Project Calico is sponsored by@projectcalico  Kubernetes  CNI fairly stable  Fine-grained policy being added – will move from alpha (annotation— based) to first-class citizen API  Mesos – multiple ways to network your container  Net-modules – but only supports Mesos containerizer  Docker networking – but then not fully integrated e.g. into MesosDNS  CNI – possible future, but not here today  Roll-your-own orchestrator-network co-ordination – the approach some of our users have taken  Docker  Swarm / Docker Datacenter still early; libnetwork evolution? policy? Gotcha #8: orchestration platforms support still evolving
  • 23. Project Calico is sponsored by@projectcalico  Docker libnetwork provides limited functionality / visibility to plug-ins  E.g. network name you specify as a user is NOT passed to the underlying SDN  Consequences:  Diagnostics hard to correlate  Hard to enable ”side loaded” commands referring to networks created on Docker command line (e.g. Calico advanced policy)  Hard to network between Docker virtual network domain and non- containerized workloads Gotcha #9: Docker libnetwork is “special”
  • 24. Project Calico is sponsored by@projectcalico  “Can you write a function that tells me when all nodes have caught up to the global state?”  Sure… Gotcha #10: at cloud scale, nothing ever converges function is_converged() return false
  • 25. Project Calico is sponsored by@projectcalico

Editor's Notes

  • #13: All the containers can talk to one another Things like Kubeproxy will allow a single service VIP to access the containers inside the virtual network But some legacy apps need direct access to the containers, and there’s no on/off-ramp possible