SlideShare a Scribd company logo
containerization: 
more than the 
new virtualization
Jérôme Petazzoni 
(@jpetazzo) 
Grumpy French DevOps 
- Go away or I will replace you 
with a very small shell script 
Runs everything in containers 
- Docker-in-Docker 
- VPN-in-Docker 
- KVM-in-Docker 
- Xorg-in-Docker 
- ...
Containerization is more than the new Virtualization: enabling separation of operational concerns
outline
Outline 
Containers as lightweight VMs 
Containers vs VMs 
Separation of operational concerns 
Benefits 
Conclusions
Containerization is more than the new Virtualization: enabling separation of operational concerns
containers as 
lightweight VMs
It looks like a VM 
Private process space 
Can run stuff as root 
Private network interface and IP address 
Custom routes, iptables rules, etc. 
Can mount filesystems and more
Process tree in a “machine container” 
PID TTY STAT TIME COMMAND 
1 ? Ss+ 0:00 /usr/bin/python3 -u /sbin/my_init --enable-insecure-key 
104 ? S+ 0:00 /usr/bin/runsvdir -P /etc/service 
105 ? Ss 0:00 _ runsv syslog-ng 
108 ? S 0:00 | _ syslog-ng -F -p /var/run/syslog-ng.pid --no-caps 
106 ? Ss 0:00 _ runsv sshd 
109 ? S 0:00 | _ /usr/sbin/sshd -D 
117 ? Ss 0:00 | _ sshd: root@pts/0 
119 pts/0 Ss 0:00 | _ -bash 
135 pts/0 R+ 0:00 | _ ps fx 
107 ? Ss 0:00 _ runsv cron 
110 ? S 0:00 _ /usr/sbin/cron -f
Faster to boot, less overhead than a VM 
$ time docker run ubuntu echo hello world 
hello world 
real 0m0.258s 
Disk usage: less than 100 kB 
Memory usage: less than 1.5 MB
Benchmark: infiniband
Benchmark: boot OpenStack instances
Benchmark: memory speed
impossibru!
Containerization is more than the new Virtualization: enabling separation of operational concerns
containers 
vs 
virtual machines
Virtual Machines 
Emulate CPU instructions 
(painfully slow) 
Emulate hardware (storage, network...) 
(painfully slow) 
Run as a userland process on top of a kernel 
(painfully slow)
Virtual Machines 
Use native CPU 
(fast!) 
Paravirtualized storage, network... 
(fast, but higher resource usage) 
Run on top of a hypervisor 
(faster, but still some overhead)
Containers 
Processes isolated from each other 
Very little extra code path 
(in many cases, it's comparable to UID checking)
Virtual Machines vs Containers 
Native CPU 
Paravirtualized devices 
Hypervisor 
Native CPU 
Native syscalls 
Native kernel
Inter-VM communication 
Strong isolation, enforced by hypervisor + hardware 
- no fast-path data transfer between virtual machines 
- yes, there are PCI pass-throughs and things like xenbus, 
but that's not easy to use, very specific, not portable 
Most convenient method: network protocols (L2/L3) 
But: huge advantage from a security POV
Inter-container communication 
Tunable isolation 
- each namespace can be isolated or shared 
Allows normal Unix communication mechanisms 
- network protocols on loopback interface 
- UNIX sockets 
- shared memory 
- IPC... 
Reuse techniques that we know and love (?)
Containerization is more than the new Virtualization: enabling separation of operational concerns
inter-container 
communication
Shared localhost 
Multiple containers can share the same “localhost” 
(by reusing the same network namespace) 
Communication over localhost is very very fast 
Also: localhost is a well-known address
Shared filesystem 
A directory can be shared by multiple containers 
(by using a bind-mount) 
That directory can contain: 
- named pipes (FIFOs) 
- UNIX sockets 
- memory-mapped files 
Bind-mount = zero overhead
Shared IPC 
Multiple containers can share IPC resources 
(using the special IPC namespace) 
Semaphores, Shared Memory, Message Queues... 
Is anybody still using this?
Host networking 
Containers can share the host's network stack 
(by reusing its network namespace) 
They can use the host's interfaces without penalty 
(high speed, low latency, no overhead!) 
Native performance to talk with external containers
Host filesystems 
Containers can share a directory with the host 
Example: use fast storage (SAN, SSD...) in container 
- mount it on the host 
- share it with the container 
- done! 
Native performance to use I/O subsystem
Containerization is more than the new Virtualization: enabling separation of operational concerns
separation of 
operational 
concerns
...What? 
“Ops” functions (backups, logging...) can be 
performed in separate containers 
Application containers can run unchanged in various 
environments: dev, test, QA, prod...
logs
Old style 
ssh into container 
cd /var/log 
tail, grep, ack-grep, awk, sed, apachetop, perl, etc.
New style 
Create a “data container” to hold the logs 
docker run --name logs -v /var/log busybox true 
Start app container sharing that volume 
docker run --volumes-from logs myapp 
Inspect logs 
docker run -ti --volumes-from logs -w /var/log ubuntu bash 
Use fancy tools without polluting app container 
docker run -ti --volumes-from logs turbogrep ...
Bonus points 
Ship logs to something else (logstash, syslog...) 
docker run --volumes-from logs pipestash 
Change logging system independently: 
- without rebuilding app container 
- without restarting app container 
- run multiple logging systems at the same time (e.g. for migration)
backups
Old style 
Prepare the tools 
- install things like rsync, s3cmd, boto, mysqldump... 
- get backup script 
Perform one-shot manual backup 
- SSH and run the backup script 
Set up routine backups 
- edit crontab
New style: setup 
Create a “data container” to hold the files to back up 
docker run --name mysqldata -v /var/lib/mysql busybox true 
Start app container sharing that volume 
docker run --volumes-from mysqldata mysql 
Create a separate image with backup tools 
- Dockerfile with “apt-get install rsync s3cmd...”
New style: one-shot manual backup 
Use the special backup image 
docker run --rm --volumes-from mysqldata mysqlbackup  
tar -cJf- /var/lib/mysql | stream-it-to-the-cloud.py 
Of course, you can use something fancier than tar 
(e.g. rsync, tarsnap...)
New style: routine backups 
Option 1 
- run “crond” in backup image 
- start backup image and keep it running 
Option 2 
- start backup script from a crontab entry on the Docker host 
Option 3 
- have a special “cron” container 
- give it access to the Docker API 
- let it start the backup container at regular intervals
network 
debugging
Old style 
ssh into container 
Install tcpdump, ngrep, … 
Run them
New style 
Make a container image with tcpdump, ngrep... 
(let's call it “netdebug”) 
Run it in the namespace of the application container 
docker run -ti --net container:<app_cid> netdebug bash 
Now run tcpdump, ngrep, etc. 
Want to copy a dump to see it with wireshark? 
docker run -ti --net container:... -v /tmp:/tmp netdebug  
tcpdump -s0 -peni eth0 -w/tmp/myapp.pcap
configuration 
tweaking
Old style 
ssh into container 
vi /etc/tomcat/something.xml 
(maybe) /etc/init.d/tomcat restart
New style 
Option 1 
- set up /etc/tomcat to be a “data container” 
- start another container sharing this volume; install vi/emacs here 
Option 2 
- set up /etc/tomcat to be on the host: 
docker run -v /etc/containers/myapp:/etc/tomcat … 
If needed: restart the container 
- docker stop; docker start 
- docker kill -s HUP
Containerization is more than the new Virtualization: enabling separation of operational concerns
epiphany
Containerization is more than the new Virtualization: enabling separation of operational concerns
composition
Virtual Machine deployment 
Linux base system 
Libraries 
Application 
Logging 
Backups 
Metrics 
...
With configuration management 
node www { 
include common 
include web 
include logstash 
include backup 
include graphite 
}
Problems 
Conflicts between two components 
- example: logging and metrics systems use different Java versions 
Software certified for different distro 
- example: one component requires RHEL 6.4 but you run Ubuntu 
Migration from one component to another 
- example: from syslog to splunk
Container deployment 
Linux base system 
Docker 
Application container 
Logging container 
Backups container 
Metrics container 
...
Containerization is more than the new Virtualization: enabling separation of operational concerns
benefits
Immutable infrastructure 
What's an immutable infrastructure? 
- re-create images each time you change a line of code 
- prevent (or track) modifications of running images 
Why is it useful? 
- no more rebellious servers after manual upgrades 
- no more “oops, how do we roll back?” after catastrophic upgrade 
- easier security audit (inspect images at rest) 
How can containers help? 
- container images are easier to create and manage than VM images
Micro-service architecture 
What's a micro-service architecture? 
- break your big application down into many small services 
Why is it useful? 
- it's easier to upgrade/refactor/replace a small service 
- encourages to have many small teams*, each owning a service 
(*small teams are supposedly better; see Jeff Bezos' “two-pizza rule”) 
How can containers help? 
- problem: 10 micro-services instead of 1 big application 
= 10x more work to deploy everything 
- solution: need extremely easy deployment; hello containers!
Containerization is more than the new Virtualization: enabling separation of operational concerns
thank you! 
questions?

More Related Content

What's hot (20)

PDF
Oracle database high availability solutions
Kirill Loifman
 
PPTX
Information storage and management
Akash Badone
 
PPTX
Recovery Techniques and Need of Recovery
Pooja Dixit
 
PDF
Alfresco Workshop: Introduction to Records Management Using Alfresco Governan...
Lighton Phiri
 
PPTX
Windows Registry Forensics with Volatility Framework
Kapil Soni
 
PPTX
Process management in linux
Mazenetsolution
 
PDF
PARALLEL FILE SYSTEM FOR LINUX CLUSTERS
RaheemUnnisa1
 
PPT
Syslog.ppt
ifsharahmad
 
PPS
Linux06 nfs
Jainul Musani
 
PDF
Understanding &Troubleshooting the Windows Logon Process
ControlUp
 
PPT
Disk scheduling
J.T.A.JONES
 
PPTX
Network and System Administration
IgguuMuude
 
PPT
Backup And Recovery
raghu_designer
 
PPTX
Dhcp server configuration
UttamAgarwal9
 
PDF
Windows Incident Response is hard, but doesn't have to be
Michael Gough
 
PPTX
Commvault Story - CVTSP_1.pptx
Hardeep Singh Manhas
 
PPT
Oracle Active Data Guard 12c New Features
Emre Baransel
 
ODP
Using Logstash, elasticsearch & kibana
Alejandro E Brito Monedero
 
PPTX
Octave
Amar Myana
 
PPT
Peterson Critical Section Problem Solution
Bipul Chandra Kar
 
Oracle database high availability solutions
Kirill Loifman
 
Information storage and management
Akash Badone
 
Recovery Techniques and Need of Recovery
Pooja Dixit
 
Alfresco Workshop: Introduction to Records Management Using Alfresco Governan...
Lighton Phiri
 
Windows Registry Forensics with Volatility Framework
Kapil Soni
 
Process management in linux
Mazenetsolution
 
PARALLEL FILE SYSTEM FOR LINUX CLUSTERS
RaheemUnnisa1
 
Syslog.ppt
ifsharahmad
 
Linux06 nfs
Jainul Musani
 
Understanding &Troubleshooting the Windows Logon Process
ControlUp
 
Disk scheduling
J.T.A.JONES
 
Network and System Administration
IgguuMuude
 
Backup And Recovery
raghu_designer
 
Dhcp server configuration
UttamAgarwal9
 
Windows Incident Response is hard, but doesn't have to be
Michael Gough
 
Commvault Story - CVTSP_1.pptx
Hardeep Singh Manhas
 
Oracle Active Data Guard 12c New Features
Emre Baransel
 
Using Logstash, elasticsearch & kibana
Alejandro E Brito Monedero
 
Octave
Amar Myana
 
Peterson Critical Section Problem Solution
Bipul Chandra Kar
 

Viewers also liked (20)

PDF
Intro to containerization
Balint Pato
 
PPTX
Software Containerization
Roshan Deniyage
 
PPTX
Containerization
Amitesh Tyagi
 
PPTX
Devops is all greek
Lori MacVittie
 
PPTX
Virtual machines and containers
Patrick Pierson
 
PPTX
Virtualization
Edris Nasihat Kon
 
PDF
Rmll Virtualization As Is Tool 20090707 V1.0
guest72e8c1
 
PPT
Virutal Box
Bahaa Salama
 
PDF
A Primer to Containerization & Microservices
Shiju Varghese
 
PPTX
Hide your development environment and application in a container
Johan Janssen
 
PDF
Containerization using docker
Vinod Doshi
 
PPT
Essence Of Containerizati on 230508
jansowri
 
PPTX
Discussing the difference between docker dontainers and virtual machines
Steven Grzbielok
 
PPTX
NoOps != No Operations
David Tesar
 
PDF
Virtualization with Vagrant (ua.pycon 2011)
Dmitry Guyvoronsky
 
PDF
bed-con 2015 - From Virtual Machines to Containers
camunda services GmbH
 
PDF
Docker containerization cookbook
Pascal Louis
 
PDF
Continuous delivery with Gradle
Bob Paulin
 
PPTX
Docker Basics
DuckDuckGo
 
PDF
Reactive Programming Models for IoT
Todd Montgomery
 
Intro to containerization
Balint Pato
 
Software Containerization
Roshan Deniyage
 
Containerization
Amitesh Tyagi
 
Devops is all greek
Lori MacVittie
 
Virtual machines and containers
Patrick Pierson
 
Virtualization
Edris Nasihat Kon
 
Rmll Virtualization As Is Tool 20090707 V1.0
guest72e8c1
 
Virutal Box
Bahaa Salama
 
A Primer to Containerization & Microservices
Shiju Varghese
 
Hide your development environment and application in a container
Johan Janssen
 
Containerization using docker
Vinod Doshi
 
Essence Of Containerizati on 230508
jansowri
 
Discussing the difference between docker dontainers and virtual machines
Steven Grzbielok
 
NoOps != No Operations
David Tesar
 
Virtualization with Vagrant (ua.pycon 2011)
Dmitry Guyvoronsky
 
bed-con 2015 - From Virtual Machines to Containers
camunda services GmbH
 
Docker containerization cookbook
Pascal Louis
 
Continuous delivery with Gradle
Bob Paulin
 
Docker Basics
DuckDuckGo
 
Reactive Programming Models for IoT
Todd Montgomery
 
Ad

Similar to Containerization is more than the new Virtualization: enabling separation of operational concerns (20)

PDF
Containerization Is More than the New Virtualization
C4Media
 
PDF
Docking postgres
rycamor
 
PDF
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
Yandex
 
PDF
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
Yandex
 
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
PDF
Docker Tips And Tricks at the Docker Beijing Meetup
Jérôme Petazzoni
 
PDF
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
Jérôme Petazzoni
 
PDF
Containers: from development to production at DevNation 2015
Jérôme Petazzoni
 
PDF
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
PDF
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Jérôme Petazzoni
 
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
PDF
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
PDF
Let's Containerize New York with Docker!
Jérôme Petazzoni
 
PDF
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
PDF
The internals and the latest trends of container runtimes
Akihiro Suda
 
PDF
Docker and Containers for Development and Deployment — SCALE12X
Jérôme Petazzoni
 
PPTX
Introduction to automated environment management with Docker Containers - for...
Lucas Jellema
 
PDF
Docker Online Meetup #3: Docker in Production
Docker, Inc.
 
PPT
2 Linux Container and Docker
Fabio Fumarola
 
Containerization Is More than the New Virtualization
C4Media
 
Docking postgres
rycamor
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
Yandex
 
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
Yandex
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Docker Tips And Tricks at the Docker Beijing Meetup
Jérôme Petazzoni
 
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
Jérôme Petazzoni
 
Containers: from development to production at DevNation 2015
Jérôme Petazzoni
 
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Jérôme Petazzoni
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
Let's Containerize New York with Docker!
Jérôme Petazzoni
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
The internals and the latest trends of container runtimes
Akihiro Suda
 
Docker and Containers for Development and Deployment — SCALE12X
Jérôme Petazzoni
 
Introduction to automated environment management with Docker Containers - for...
Lucas Jellema
 
Docker Online Meetup #3: Docker in Production
Docker, Inc.
 
2 Linux Container and Docker
Fabio Fumarola
 
Ad

More from Jérôme Petazzoni (20)

PDF
Use the Source or Join the Dark Side: differences between Docker Community an...
Jérôme Petazzoni
 
PDF
Orchestration for the rest of us
Jérôme Petazzoni
 
PDF
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Jérôme Petazzoni
 
PDF
Docker : quels enjeux pour le stockage et réseau ? Paris Open Source Summit ...
Jérôme Petazzoni
 
PDF
Making DevOps Secure with Docker on Solaris (Oracle Open World, with Jesse Bu...
Jérôme Petazzoni
 
PDF
Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Jérôme Petazzoni
 
PDF
From development environments to production deployments with Docker, Compose,...
Jérôme Petazzoni
 
PDF
How to contribute to large open source projects like Docker (LinuxCon 2015)
Jérôme Petazzoni
 
PDF
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Jérôme Petazzoni
 
PDF
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Jérôme Petazzoni
 
PDF
Microservices. Microservices everywhere! (At OSCON 2015)
Jérôme Petazzoni
 
PDF
Deploy microservices in containers with Docker and friends - KCDC2015
Jérôme Petazzoni
 
PDF
Immutable infrastructure with Docker and containers (GlueCon 2015)
Jérôme Petazzoni
 
PDF
The Docker ecosystem and the future of application deployment
Jérôme Petazzoni
 
PDF
Docker: automation for the rest of us
Jérôme Petazzoni
 
PDF
Docker Non Technical Presentation
Jérôme Petazzoni
 
PDF
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
PDF
Introduction to Docker, December 2014 "Tour de France" Edition
Jérôme Petazzoni
 
PDF
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
PDF
Pipework: Software-Defined Network for Containers and Docker
Jérôme Petazzoni
 
Use the Source or Join the Dark Side: differences between Docker Community an...
Jérôme Petazzoni
 
Orchestration for the rest of us
Jérôme Petazzoni
 
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Jérôme Petazzoni
 
Docker : quels enjeux pour le stockage et réseau ? Paris Open Source Summit ...
Jérôme Petazzoni
 
Making DevOps Secure with Docker on Solaris (Oracle Open World, with Jesse Bu...
Jérôme Petazzoni
 
Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Jérôme Petazzoni
 
From development environments to production deployments with Docker, Compose,...
Jérôme Petazzoni
 
How to contribute to large open source projects like Docker (LinuxCon 2015)
Jérôme Petazzoni
 
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Jérôme Petazzoni
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Jérôme Petazzoni
 
Microservices. Microservices everywhere! (At OSCON 2015)
Jérôme Petazzoni
 
Deploy microservices in containers with Docker and friends - KCDC2015
Jérôme Petazzoni
 
Immutable infrastructure with Docker and containers (GlueCon 2015)
Jérôme Petazzoni
 
The Docker ecosystem and the future of application deployment
Jérôme Petazzoni
 
Docker: automation for the rest of us
Jérôme Petazzoni
 
Docker Non Technical Presentation
Jérôme Petazzoni
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
Introduction to Docker, December 2014 "Tour de France" Edition
Jérôme Petazzoni
 
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
Pipework: Software-Defined Network for Containers and Docker
Jérôme Petazzoni
 

Recently uploaded (20)

PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 

Containerization is more than the new Virtualization: enabling separation of operational concerns

  • 1. containerization: more than the new virtualization
  • 2. Jérôme Petazzoni (@jpetazzo) Grumpy French DevOps - Go away or I will replace you with a very small shell script Runs everything in containers - Docker-in-Docker - VPN-in-Docker - KVM-in-Docker - Xorg-in-Docker - ...
  • 5. Outline Containers as lightweight VMs Containers vs VMs Separation of operational concerns Benefits Conclusions
  • 8. It looks like a VM Private process space Can run stuff as root Private network interface and IP address Custom routes, iptables rules, etc. Can mount filesystems and more
  • 9. Process tree in a “machine container” PID TTY STAT TIME COMMAND 1 ? Ss+ 0:00 /usr/bin/python3 -u /sbin/my_init --enable-insecure-key 104 ? S+ 0:00 /usr/bin/runsvdir -P /etc/service 105 ? Ss 0:00 _ runsv syslog-ng 108 ? S 0:00 | _ syslog-ng -F -p /var/run/syslog-ng.pid --no-caps 106 ? Ss 0:00 _ runsv sshd 109 ? S 0:00 | _ /usr/sbin/sshd -D 117 ? Ss 0:00 | _ sshd: root@pts/0 119 pts/0 Ss 0:00 | _ -bash 135 pts/0 R+ 0:00 | _ ps fx 107 ? Ss 0:00 _ runsv cron 110 ? S 0:00 _ /usr/sbin/cron -f
  • 10. Faster to boot, less overhead than a VM $ time docker run ubuntu echo hello world hello world real 0m0.258s Disk usage: less than 100 kB Memory usage: less than 1.5 MB
  • 17. Virtual Machines Emulate CPU instructions (painfully slow) Emulate hardware (storage, network...) (painfully slow) Run as a userland process on top of a kernel (painfully slow)
  • 18. Virtual Machines Use native CPU (fast!) Paravirtualized storage, network... (fast, but higher resource usage) Run on top of a hypervisor (faster, but still some overhead)
  • 19. Containers Processes isolated from each other Very little extra code path (in many cases, it's comparable to UID checking)
  • 20. Virtual Machines vs Containers Native CPU Paravirtualized devices Hypervisor Native CPU Native syscalls Native kernel
  • 21. Inter-VM communication Strong isolation, enforced by hypervisor + hardware - no fast-path data transfer between virtual machines - yes, there are PCI pass-throughs and things like xenbus, but that's not easy to use, very specific, not portable Most convenient method: network protocols (L2/L3) But: huge advantage from a security POV
  • 22. Inter-container communication Tunable isolation - each namespace can be isolated or shared Allows normal Unix communication mechanisms - network protocols on loopback interface - UNIX sockets - shared memory - IPC... Reuse techniques that we know and love (?)
  • 25. Shared localhost Multiple containers can share the same “localhost” (by reusing the same network namespace) Communication over localhost is very very fast Also: localhost is a well-known address
  • 26. Shared filesystem A directory can be shared by multiple containers (by using a bind-mount) That directory can contain: - named pipes (FIFOs) - UNIX sockets - memory-mapped files Bind-mount = zero overhead
  • 27. Shared IPC Multiple containers can share IPC resources (using the special IPC namespace) Semaphores, Shared Memory, Message Queues... Is anybody still using this?
  • 28. Host networking Containers can share the host's network stack (by reusing its network namespace) They can use the host's interfaces without penalty (high speed, low latency, no overhead!) Native performance to talk with external containers
  • 29. Host filesystems Containers can share a directory with the host Example: use fast storage (SAN, SSD...) in container - mount it on the host - share it with the container - done! Native performance to use I/O subsystem
  • 32. ...What? “Ops” functions (backups, logging...) can be performed in separate containers Application containers can run unchanged in various environments: dev, test, QA, prod...
  • 33. logs
  • 34. Old style ssh into container cd /var/log tail, grep, ack-grep, awk, sed, apachetop, perl, etc.
  • 35. New style Create a “data container” to hold the logs docker run --name logs -v /var/log busybox true Start app container sharing that volume docker run --volumes-from logs myapp Inspect logs docker run -ti --volumes-from logs -w /var/log ubuntu bash Use fancy tools without polluting app container docker run -ti --volumes-from logs turbogrep ...
  • 36. Bonus points Ship logs to something else (logstash, syslog...) docker run --volumes-from logs pipestash Change logging system independently: - without rebuilding app container - without restarting app container - run multiple logging systems at the same time (e.g. for migration)
  • 38. Old style Prepare the tools - install things like rsync, s3cmd, boto, mysqldump... - get backup script Perform one-shot manual backup - SSH and run the backup script Set up routine backups - edit crontab
  • 39. New style: setup Create a “data container” to hold the files to back up docker run --name mysqldata -v /var/lib/mysql busybox true Start app container sharing that volume docker run --volumes-from mysqldata mysql Create a separate image with backup tools - Dockerfile with “apt-get install rsync s3cmd...”
  • 40. New style: one-shot manual backup Use the special backup image docker run --rm --volumes-from mysqldata mysqlbackup tar -cJf- /var/lib/mysql | stream-it-to-the-cloud.py Of course, you can use something fancier than tar (e.g. rsync, tarsnap...)
  • 41. New style: routine backups Option 1 - run “crond” in backup image - start backup image and keep it running Option 2 - start backup script from a crontab entry on the Docker host Option 3 - have a special “cron” container - give it access to the Docker API - let it start the backup container at regular intervals
  • 43. Old style ssh into container Install tcpdump, ngrep, … Run them
  • 44. New style Make a container image with tcpdump, ngrep... (let's call it “netdebug”) Run it in the namespace of the application container docker run -ti --net container:<app_cid> netdebug bash Now run tcpdump, ngrep, etc. Want to copy a dump to see it with wireshark? docker run -ti --net container:... -v /tmp:/tmp netdebug tcpdump -s0 -peni eth0 -w/tmp/myapp.pcap
  • 46. Old style ssh into container vi /etc/tomcat/something.xml (maybe) /etc/init.d/tomcat restart
  • 47. New style Option 1 - set up /etc/tomcat to be a “data container” - start another container sharing this volume; install vi/emacs here Option 2 - set up /etc/tomcat to be on the host: docker run -v /etc/containers/myapp:/etc/tomcat … If needed: restart the container - docker stop; docker start - docker kill -s HUP
  • 52. Virtual Machine deployment Linux base system Libraries Application Logging Backups Metrics ...
  • 53. With configuration management node www { include common include web include logstash include backup include graphite }
  • 54. Problems Conflicts between two components - example: logging and metrics systems use different Java versions Software certified for different distro - example: one component requires RHEL 6.4 but you run Ubuntu Migration from one component to another - example: from syslog to splunk
  • 55. Container deployment Linux base system Docker Application container Logging container Backups container Metrics container ...
  • 58. Immutable infrastructure What's an immutable infrastructure? - re-create images each time you change a line of code - prevent (or track) modifications of running images Why is it useful? - no more rebellious servers after manual upgrades - no more “oops, how do we roll back?” after catastrophic upgrade - easier security audit (inspect images at rest) How can containers help? - container images are easier to create and manage than VM images
  • 59. Micro-service architecture What's a micro-service architecture? - break your big application down into many small services Why is it useful? - it's easier to upgrade/refactor/replace a small service - encourages to have many small teams*, each owning a service (*small teams are supposedly better; see Jeff Bezos' “two-pizza rule”) How can containers help? - problem: 10 micro-services instead of 1 big application = 10x more work to deploy everything - solution: need extremely easy deployment; hello containers!