SlideShare a Scribd company logo
Docker networking
Lessons learned in reaching multi-host container networking
Tony Georgiev
Software Engineer, Cloud Automation Platform at VMware
History
• Building container management solution long long time ago (last October) -
https://github.com/vmware/admiral
• Intelligent policy based scheduler
• Deploying connected containers on single host
• Deploying dis-connected containers on multi hosts
2
3
Admiral’s scheduler
deploys to multi-hosts
Docker relsease timeline source:
http://www.slideshare.net/Docker/docker-networking-control-plane-and-data-plane
State of networking pre Docker 1.9
• Single host Container-2-container communication with docker links (legacy)
• Network mode: none, host, bridge (docker0)
• 3rd party drivers (Flannel, Weave, Calico)
4
What we tried
• DNS
• DNS load balancing (AKA poor man’s load balancing)
• The standard HAProxy container as ambassador
• Custom built HAProxy based container as ambassador – agent
5
Our (old) networking solution
6
Host A Host B Host C
Network
Agent Service A Agent Service B Agent DB
Service B
/etc/hosts
172.17.0.1 service-b
172.17.0.1 db
bind 172.17.0.1:80
…
bind 172.17.0.1:3306
…
Agent specs
• Based on the Ambassador linking pattern
• Written in GO
• Docker image based on Alpine and PhotonOS
• Based on HAProxy with zero downtime reloading
• Configuration is pushed from the orchestrator
• Layer 4 routing (based on source ips and ports)
• Load balancing
7
Pros
• Unobtrusive, can be deployed on any host
• Does not require any 3rd party drivers or manual host setup
• Docker compose compatible (legacy links)
• Same definition that was used before for a single host
• Works the same on single as well on multi hosts
8
Cons
• Different than tools Ops are comfortable with
• Requires service’s ports to be exposed.
• 1 port per service
• Agent/container that needs to be deployed and managed
• Not compatible with newer Docker compose having networks, i.e. different that how people
build apps.
9
State of networking in Docker 1.9-1.12
• Acquired Socketplane.io
• Native multi-host networking (overlay)
• Control plane requires shared KV store (1.9+) or Swarm mode (1.12) (gossip based)
• User defined networks (user defined bridge, isolated from other bridges)
• Plugins & Drivers
10
Docker networking under the hood
• DNS (inside the host)
• DNS based load balancer (1.11)
11
Graphic source:
https://sreeninet.wordpress.com/2016/07/29/service-discovery-and-load-balancing-internals-in-docker-1-12/
Docker networking under the hood
• IPVS (IP Virtual Server) – Layer 4 load balancer
Load balancer based on VIP & IPVS (on every container) (1.12 swarm mode)
12
Graphic source:
https://sreeninet.wordpress.com/2016/07/29/service-discovery-and-load-balancing-internals-in-docker-1-12/
Docker networking under the hood
• VXLAN (Virtual extensible LAN) – network virtualization tunneling protocol
• Every host is VTEP (VXLAN Tunnel Endpoint)
• Secure dataplane (IPSec)
13
New networking solution
14
Host A Host B Host C
Agent Service A Agent Service B Agent DB
Service B
KV store
(etcd, zookeeper, consul,
Admiral)
Network (underlay)
VXLAN
tunnel
VXLAN
tunnel
VTE
P
VTE
P
VTE
P
DNS
Demo
• https://github.com/tgeorgiev/docker-meetup
15
Useful resources
• https://www.youtube.com/watch?v=Gwdo3fo6pZg (Docker networking deep dive by Madhu
Venugopal and Jana Radakrishnan @dockercon 16)
• http://nerds.airbnb.com/smartstack-service-discovery-cloud/
• https://sreeninet.wordpress.com/2016/07/29/service-discovery-and-load-balancing-internals-in-
docker-1-12/
• http://blog.nigelpoulton.com/demystifying-docker-overlay-networking/ (part of “Docker for
Sysadmins” book)
• https://www.percona.com/blog/2016/08/03/testing-docker-multi-host-network-performance/
• https://medium.com/@lherrera/poor-mans-load-balancing-with-docker-
2be014983e5#.c4gwgye25
16
Thank you.

More Related Content

PDF
Introduction to Docker storage, volume and image
PDF
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
PDF
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
PPTX
The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...
PPTX
Docker 1.5
PDF
Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)
PDF
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
PDF
Nebulaworks Docker Overview 09-22-2015
Introduction to Docker storage, volume and image
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...
Docker 1.5
Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Nebulaworks Docker Overview 09-22-2015

What's hot (20)

PDF
Jakarta EE 8 on JDK17
PPTX
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
PPTX
Docker Networking Tip - Load balancing options
PDF
Docker Swarm and Traefik 2.0
PDF
Unikernels: the rise of the library hypervisor in MirageOS
PDF
Wanting distributed volumes - Experiences with ceph-docker
PPTX
virtualization-vs-containerization-paas
PPT
Kubernetes on CloudStack with coreOS
PPTX
Comprehensive Monitoring for Docker
PDF
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
PDF
What's New in Docker 1.12?
PDF
Advanced Docker Developer Workflows on MacOS X and Windows
PDF
Container orchestration
PDF
Demystifying puppet
PPTX
Docker practical solutions
PDF
runC: The little engine that could (run Docker containers) by Docker Captain ...
PPTX
Docker Swarm Is Dead: Long Live Docker Swarm
PPTX
Container Orchestration
PPTX
Containers and docker
PDF
Docker 1.11 @ Docker SF Meetup
Jakarta EE 8 on JDK17
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Docker Networking Tip - Load balancing options
Docker Swarm and Traefik 2.0
Unikernels: the rise of the library hypervisor in MirageOS
Wanting distributed volumes - Experiences with ceph-docker
virtualization-vs-containerization-paas
Kubernetes on CloudStack with coreOS
Comprehensive Monitoring for Docker
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12?
Advanced Docker Developer Workflows on MacOS X and Windows
Container orchestration
Demystifying puppet
Docker practical solutions
runC: The little engine that could (run Docker containers) by Docker Captain ...
Docker Swarm Is Dead: Long Live Docker Swarm
Container Orchestration
Containers and docker
Docker 1.11 @ Docker SF Meetup
Ad

Viewers also liked (20)

PDF
Multi host networking with docker
PPTX
Docker networking Tutorial 101
PPTX
Docker networking basics & coupling with Software Defined Networks
PDF
Containers Through the Ages - SysEleven
PDF
Docker 101 @KACST Saudi HPC 2016
PPTX
Joomla Day Poland 15 - Docker
PDF
Atlassian User Group Lower Silesia BUILDFAILUJE? PRZECIEŻ U MNIE DZIAŁAŁO
PPTX
Docker Networking - Boulder Linux Users Group (BLUG)
PPTX
Understanding container security
PPTX
Networking in Docker Containers
PDF
Containers technologies
PDF
Chw00t: Breaking unices’ chroot solutions
PDF
Docker Networking – Running multi-host applications
PPT
Docker Multi Host Networking, Rachit Arora, IBM
PPTX
Single Host Docker Networking
PDF
Container orchestration
PDF
#eventcepcja Networking Izabela Górska (Business Link Warszawa)
PPTX
Docker Networking
PDF
Octo talk : docker multi-host networking
Multi host networking with docker
Docker networking Tutorial 101
Docker networking basics & coupling with Software Defined Networks
Containers Through the Ages - SysEleven
Docker 101 @KACST Saudi HPC 2016
Joomla Day Poland 15 - Docker
Atlassian User Group Lower Silesia BUILDFAILUJE? PRZECIEŻ U MNIE DZIAŁAŁO
Docker Networking - Boulder Linux Users Group (BLUG)
Understanding container security
Networking in Docker Containers
Containers technologies
Chw00t: Breaking unices’ chroot solutions
Docker Networking – Running multi-host applications
Docker Multi Host Networking, Rachit Arora, IBM
Single Host Docker Networking
Container orchestration
#eventcepcja Networking Izabela Górska (Business Link Warszawa)
Docker Networking
Octo talk : docker multi-host networking
Ad

Similar to Lessons learned in reaching multi-host container networking (20)

PPTX
Docker Networking Overview
PDF
Killer Docker Workflows for Development
PDF
Orchestrating Linux Containers while tolerating failures
PPTX
Everything you need to know about Docker
PPTX
WebSphere Application Server Liberty Profile and Docker
PDF
Was liberty profile and docker
PPTX
Intro docker and demo monitor on docker
PPTX
DockerCon EU 2015 Barcelona
PDF
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
PDF
Improving Development and Deployment with Docker
PPTX
ma-formation-en-Docker-jlklk,nknkjn.pptx
PPTX
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
PDF
Oracle WebLogic Server 12c with Docker
PPT
14309525_docker_docker_docker_docker_introduction.ppt
PDF
Docker introduction
PPTX
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
PPTX
Docker-Intro
PPTX
Accelerate your development with Docker
PDF
Accelerate your software development with Docker
Docker Networking Overview
Killer Docker Workflows for Development
Orchestrating Linux Containers while tolerating failures
Everything you need to know about Docker
WebSphere Application Server Liberty Profile and Docker
Was liberty profile and docker
Intro docker and demo monitor on docker
DockerCon EU 2015 Barcelona
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
Improving Development and Deployment with Docker
ma-formation-en-Docker-jlklk,nknkjn.pptx
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Oracle WebLogic Server 12c with Docker
14309525_docker_docker_docker_docker_introduction.ppt
Docker introduction
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
Docker-Intro
Accelerate your development with Docker
Accelerate your software development with Docker

Recently uploaded (20)

PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Understanding Forklifts - TECH EHS Solution
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
AI in Product Development-omnex systems
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Transform Your Business with a Software ERP System
PDF
System and Network Administraation Chapter 3
PPTX
ai tools demonstartion for schools and inter college
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
ISO 45001 Occupational Health and Safety Management System
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
CHAPTER 2 - PM Management and IT Context
Understanding Forklifts - TECH EHS Solution
How to Migrate SBCGlobal Email to Yahoo Easily
Softaken Excel to vCard Converter Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Design an Analysis of Algorithms II-SECS-1021-03
PTS Company Brochure 2025 (1).pdf.......
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
AI in Product Development-omnex systems
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Transform Your Business with a Software ERP System
System and Network Administraation Chapter 3
ai tools demonstartion for schools and inter college
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus

Lessons learned in reaching multi-host container networking

  • 1. Docker networking Lessons learned in reaching multi-host container networking Tony Georgiev Software Engineer, Cloud Automation Platform at VMware
  • 2. History • Building container management solution long long time ago (last October) - https://github.com/vmware/admiral • Intelligent policy based scheduler • Deploying connected containers on single host • Deploying dis-connected containers on multi hosts 2
  • 3. 3 Admiral’s scheduler deploys to multi-hosts Docker relsease timeline source: http://www.slideshare.net/Docker/docker-networking-control-plane-and-data-plane
  • 4. State of networking pre Docker 1.9 • Single host Container-2-container communication with docker links (legacy) • Network mode: none, host, bridge (docker0) • 3rd party drivers (Flannel, Weave, Calico) 4
  • 5. What we tried • DNS • DNS load balancing (AKA poor man’s load balancing) • The standard HAProxy container as ambassador • Custom built HAProxy based container as ambassador – agent 5
  • 6. Our (old) networking solution 6 Host A Host B Host C Network Agent Service A Agent Service B Agent DB Service B /etc/hosts 172.17.0.1 service-b 172.17.0.1 db bind 172.17.0.1:80 … bind 172.17.0.1:3306 …
  • 7. Agent specs • Based on the Ambassador linking pattern • Written in GO • Docker image based on Alpine and PhotonOS • Based on HAProxy with zero downtime reloading • Configuration is pushed from the orchestrator • Layer 4 routing (based on source ips and ports) • Load balancing 7
  • 8. Pros • Unobtrusive, can be deployed on any host • Does not require any 3rd party drivers or manual host setup • Docker compose compatible (legacy links) • Same definition that was used before for a single host • Works the same on single as well on multi hosts 8
  • 9. Cons • Different than tools Ops are comfortable with • Requires service’s ports to be exposed. • 1 port per service • Agent/container that needs to be deployed and managed • Not compatible with newer Docker compose having networks, i.e. different that how people build apps. 9
  • 10. State of networking in Docker 1.9-1.12 • Acquired Socketplane.io • Native multi-host networking (overlay) • Control plane requires shared KV store (1.9+) or Swarm mode (1.12) (gossip based) • User defined networks (user defined bridge, isolated from other bridges) • Plugins & Drivers 10
  • 11. Docker networking under the hood • DNS (inside the host) • DNS based load balancer (1.11) 11 Graphic source: https://sreeninet.wordpress.com/2016/07/29/service-discovery-and-load-balancing-internals-in-docker-1-12/
  • 12. Docker networking under the hood • IPVS (IP Virtual Server) – Layer 4 load balancer Load balancer based on VIP & IPVS (on every container) (1.12 swarm mode) 12 Graphic source: https://sreeninet.wordpress.com/2016/07/29/service-discovery-and-load-balancing-internals-in-docker-1-12/
  • 13. Docker networking under the hood • VXLAN (Virtual extensible LAN) – network virtualization tunneling protocol • Every host is VTEP (VXLAN Tunnel Endpoint) • Secure dataplane (IPSec) 13
  • 14. New networking solution 14 Host A Host B Host C Agent Service A Agent Service B Agent DB Service B KV store (etcd, zookeeper, consul, Admiral) Network (underlay) VXLAN tunnel VXLAN tunnel VTE P VTE P VTE P DNS
  • 16. Useful resources • https://www.youtube.com/watch?v=Gwdo3fo6pZg (Docker networking deep dive by Madhu Venugopal and Jana Radakrishnan @dockercon 16) • http://nerds.airbnb.com/smartstack-service-discovery-cloud/ • https://sreeninet.wordpress.com/2016/07/29/service-discovery-and-load-balancing-internals-in- docker-1-12/ • http://blog.nigelpoulton.com/demystifying-docker-overlay-networking/ (part of “Docker for Sysadmins” book) • https://www.percona.com/blog/2016/08/03/testing-docker-multi-host-network-performance/ • https://medium.com/@lherrera/poor-mans-load-balancing-with-docker- 2be014983e5#.c4gwgye25 16

Editor's Notes

  • #2: In this session we will show what we learned, the obstacles and solutions we went through in order to deliver unobtrusive and simple to use multi-host container networking in Admiral - the container management solution. We will talk about the state of Docker networking before user defined networking, the implementation of custom networking solution, it’s pros and cons, and wrap up with the current state of Docker networking and how we adapted it. Lessons learned while implementing multi-host container networking in the container management solution - Admiral.
  • #5: In the docker0 bridge all containers on the same host can talk to each other – not desired. NATing/port mapping
  • #12: User defined Bridge networks – isolated; Containers between bridge networks cannot talk to each other Docker networking uses Linux kernel features Overlay network is achieved using VXLAN tunnels VIP & IPVS – IP Virtual Server - Layer 4 switching http://www.linuxvirtualserver.org/software/ipvs.html Security can be enabled when creating the overlay network - https://en.wikipedia.org/wiki/Ipsec
  • #13: User defined Bridge networks – isolated; Containers between bridge networks cannot talk to each other Docker networking uses Linux kernel features Overlay network is achieved using VXLAN tunnels VIP & IPVS – IP Virtual Server - Layer 4 switching http://www.linuxvirtualserver.org/software/ipvs.html Security can be enabled when creating the overlay network - https://en.wikipedia.org/wiki/Ipsec
  • #14: User defined Bridge networks – isolated; Containers between bridge networks cannot talk to each other Docker networking uses Linux kernel features Overlay network is achieved using VXLAN tunnels VIP & IPVS – IP Virtual Server - Layer 4 switching http://www.linuxvirtualserver.org/software/ipvs.html Security can be enabled when creating the overlay network - https://en.wikipedia.org/wiki/Ipsec