SlideShare a Scribd company logo
Microservices.
Microservices
Everywhere!
Jérôme Petazzoni — @jpetazzo
Docker Inc. — @docker
Who am I?
French software engineer living in California
Joined Docker (dotCloud) more than 4 years ago
(I was at Docker before it was cool!)
I have built and scaled the dotCloud PaaS
I learned a few things about running containers
(in production)
Outline
What are microservices?
What are their challenges?
How does Docker help?
How can we do this today?
What are microservices?
Microservices: a style of software architecture
Break big application down into many small services
Example: e-commerce
- web front-end
- catalog of products
- inventory/stock management
- shipping calculator
- payment processor
- billing/invoicing
- recommendation engine
- user profiles
Why are we doing this? (1/2)
Use different stacks for different services
(use the right language/tool for the job)
Replace or refactor individual services easily
Less coordination required when deploying
- deploy more often
- less risk
- more agility and speed
Why are we doing this? (2/2)
Promotes many small teams instead of one big army
- smaller teams = less communication overhead
- see Jeff Bezos' "two-pizza rule"
Enables effective ownership of services
- a service always has an "owner" (=team)
- the owner is responsible (=on call)
- the owner is empowered (=can fix things)
What are the challenges
associated with microservices?
Fast, efficient RPC calls
Docker does not help with that. See instead:
- ZeroRPC
- Cap'n Proto
- XMLRPC
- SOAP
- Dnode
- REST
- Queues (like AMQP), for long-running/async operations
Architecturing the application in small blocks
Docker does not help with that.
Some tips:
- Pretend that you're outsourcing parts of your stack
- Wrap database access;
each object (or table) = one service
Efficient deployment system
Instead of deploying one monolith once in a while,
we deploy many services very frequently
The manual, tedious, uniquely tailored deployment system
has to be replaced with something simple and reliable
It must be easy to add new components and deploy them
Docker does help with that.
Network plumbing
Instead of one monolith talking to a database,
we now have 100s of services talking to each other
Those services will often be scaled independently
Instead of direct, deterministic library calls,
we now have network calls across load balancers
Scaling, load balancing, monitoring must be easy to do
Docker does help with that.
More challenges
See Microservices: not a free lunch[1],
by Benjamin Wootton.
[1] http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
How does Docker help us to
implement microservices?
Building code, without Docker
Deployment scripts are fragile
Configuration management is hard
(and not a silver bullet)
Environments differ:
- from dev to dev
- from dev to prod
Building code, with Docker
Write a Dockerfile for each component
Builds are fast
- each build step is saved
- future builds will reuse saved steps
Builds are reproducible
- build environment can be well-defined
- outside context is limited
class: picture
Shipping code, without Docker
Push code or build artifacts to servers
Distro packages (deb, rpm...) are great,
but hard to build (too generic)
Artifact libraries are great,
but tailored to specific languages (too specific)
When deployment fails, rollback isn't guaranteed to work
Shipping code, with Docker
Container images can be pushed to registries
Container engines can pull from those registries
Docker Inc. provides a free registry (the Docker Hub)
Works out of the box in 2 minutes
(includes account creation and engine setup)
Can also be deployed on prem
Rollbacks are easy
(see: immutable infrastructure with containers)
class: picture
Network plumbing, without Docker
Application code must be modified to handle:
- service discovery
(e.g. lookup endpoint addresses into Consul, Etcd, ZK)
- failover
(same, but also needs to watch for changes)
Development stack becomes either:
- very complex
(because of those extra components)
- different from production
(because the code path differs)
Network plumbing, with Docker
Application code doesn't deal with plumbing
Application code connects to services using DNS aliases
DNS aliases are injected by Docker
(as entries in /etc/hosts)
In dev, DNS aliases map directly to service containers
In prod, DNS aliases map to special-purpose containers,
implementing service discovery, load-balancing, failover
Those containers are called ambassadors
class: picture
How can we do this today?
Developing on a single node
Docker Compose
Describe a stack of containers in a simple YAML file
Start the stack with a single command
Compose connects containers together with links
Also provides simple scaling and log aggregation
class: picture
Scaling with static resource scheduling
Docker Compose + Docker remote API
Deploy stateful services separately
Replace them with ambassadors in the stack
Instantiate the stack multiple times
Fits well with existing IAAS auto-scaling models
class: picture
Scaling with dynamic resource scheduling
Docker Compose + Docker Swarm
Swarm consolidates multiple Docker hosts into a single one
Swarm "looks like" a Docker daemon, but it dispatches (schedules)
your containers on multiple daemons
Swarm speaks the Docker API front and back
Swarm is open source and written in Go (like Docker)
Swarm was started by two of the original Docker authors
(@aluzzardi and @vieux)
Swarm is not stable yet (version 0.3 right now)
No live demo
Video from DockerCon 2015, last month
(10 minutes)
https://www.youtube.com/watch?v=at72dhg-SZY&t=2600
Thanks!
Questions?
@jpetazzo — @docker

More Related Content

What's hot (20)

PDF
Introduction to Docker and deployment and Azure
Jérôme Petazzoni
 
PDF
LXC, Docker, and the future of software delivery | LinuxCon 2013
dotCloud
 
PDF
Docker from A to Z, including Swarm and OCCS
Frank Munz
 
PDF
Intro to containerization
Balint Pato
 
PDF
Docker and Puppet — Puppet Camp L.A. — SCALE12X
Jérôme Petazzoni
 
PDF
Solving Real World Production Problems with Docker
Marc Campbell
 
PDF
Cassandra and docker
Ben Bromhead
 
PPTX
KVM and docker LXC Benchmarking with OpenStack
Boden Russell
 
PDF
Lightweight Virtualization: LXC containers & AUFS
Jérôme Petazzoni
 
PDF
The Docker ecosystem and the future of application deployment
Jérôme Petazzoni
 
PDF
Tech Talk - Vagrant
Thomas Krille
 
PDF
A Hands-on Introduction to Docker
CodeOps Technologies LLP
 
PDF
Orchestrating Docker containers at scale
Maciej Lasyk
 
PDF
Visualising Basic Concepts of Docker
vishnu rao
 
PDF
Demystifying kubernetes
Works Applications
 
PDF
Docker puebla bday #4 celebration
Ramon Morales
 
PDF
Docker - introduction
Michał Kurzeja
 
PDF
Puppet and Vagrant in development
Adam Culp
 
PPTX
What is Docker
Pavel Klimiankou
 
PPTX
Docker Basic Presentation
Aman Chhabra
 
Introduction to Docker and deployment and Azure
Jérôme Petazzoni
 
LXC, Docker, and the future of software delivery | LinuxCon 2013
dotCloud
 
Docker from A to Z, including Swarm and OCCS
Frank Munz
 
Intro to containerization
Balint Pato
 
Docker and Puppet — Puppet Camp L.A. — SCALE12X
Jérôme Petazzoni
 
Solving Real World Production Problems with Docker
Marc Campbell
 
Cassandra and docker
Ben Bromhead
 
KVM and docker LXC Benchmarking with OpenStack
Boden Russell
 
Lightweight Virtualization: LXC containers & AUFS
Jérôme Petazzoni
 
The Docker ecosystem and the future of application deployment
Jérôme Petazzoni
 
Tech Talk - Vagrant
Thomas Krille
 
A Hands-on Introduction to Docker
CodeOps Technologies LLP
 
Orchestrating Docker containers at scale
Maciej Lasyk
 
Visualising Basic Concepts of Docker
vishnu rao
 
Demystifying kubernetes
Works Applications
 
Docker puebla bday #4 celebration
Ramon Morales
 
Docker - introduction
Michał Kurzeja
 
Puppet and Vagrant in development
Adam Culp
 
What is Docker
Pavel Klimiankou
 
Docker Basic Presentation
Aman Chhabra
 

Viewers also liked (12)

PDF
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
PDF
How to contribute to large open source projects like Docker (LinuxCon 2015)
Jérôme Petazzoni
 
PDF
Docker Non Technical Presentation
Jérôme Petazzoni
 
PDF
Deploy microservices in containers with Docker and friends - KCDC2015
Jérôme Petazzoni
 
PDF
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Jérôme Petazzoni
 
PDF
Immutable infrastructure with Docker and containers (GlueCon 2015)
Jérôme Petazzoni
 
PDF
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Jérôme Petazzoni
 
PPTX
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
Christian Beedgen
 
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
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
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
How to contribute to large open source projects like Docker (LinuxCon 2015)
Jérôme Petazzoni
 
Docker Non Technical Presentation
Jérôme Petazzoni
 
Deploy microservices in containers with Docker and friends - KCDC2015
Jérôme Petazzoni
 
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Jérôme Petazzoni
 
Immutable infrastructure with Docker and containers (GlueCon 2015)
Jérôme Petazzoni
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Jérôme Petazzoni
 
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
Christian Beedgen
 
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
 
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
 
Ad

Similar to Microservices. Microservices everywhere! (At OSCON 2015) (20)

PDF
Rami Sayar - Node microservices with Docker
Web à Québec
 
PDF
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
PDF
Docker + Microservices in Production
Patrick Mizer
 
PDF
Containers, microservices and serverless for realists
Karthik Gaekwad
 
PDF
Microservices Docker @Bonn Agile
Timo Derstappen
 
PPTX
Docker-N-Beyond
santosh007
 
PPTX
Docker for the enterprise
Bert Poller
 
PPTX
Microservices in academic environment
Milind Bhagwati
 
PDF
Powering Microservices with Docker
Cognizant
 
PPTX
Microservices and docker
Alex Ivy
 
PPTX
Docker intro
spiddy
 
PDF
Docker what - Frank Maounis
Frank Maounis
 
PPTX
Docker Platform and Ecosystem
Patrick Chanezon
 
PDF
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
Yandex
 
PDF
Docker dev ops for cd meetup 12-14
Simon Storm
 
PPTX
The challenge of application distribution - Introduction to Docker (2014 dec ...
Sébastien Portebois
 
PDF
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
PDF
Demystifying Docker
Cloud Native Bangalore
 
PPTX
Demystifying Docker101
Ajeet Singh Raina
 
PDF
Microservices: How loose is loosely coupled?
John Rofrano
 
Rami Sayar - Node microservices with Docker
Web à Québec
 
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
Docker + Microservices in Production
Patrick Mizer
 
Containers, microservices and serverless for realists
Karthik Gaekwad
 
Microservices Docker @Bonn Agile
Timo Derstappen
 
Docker-N-Beyond
santosh007
 
Docker for the enterprise
Bert Poller
 
Microservices in academic environment
Milind Bhagwati
 
Powering Microservices with Docker
Cognizant
 
Microservices and docker
Alex Ivy
 
Docker intro
spiddy
 
Docker what - Frank Maounis
Frank Maounis
 
Docker Platform and Ecosystem
Patrick Chanezon
 
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
Yandex
 
Docker dev ops for cd meetup 12-14
Simon Storm
 
The challenge of application distribution - Introduction to Docker (2014 dec ...
Sébastien Portebois
 
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
Demystifying Docker
Cloud Native Bangalore
 
Demystifying Docker101
Ajeet Singh Raina
 
Microservices: How loose is loosely coupled?
John Rofrano
 
Ad

More from Jérôme Petazzoni (10)

PDF
Use the Source or Join the Dark Side: differences between Docker Community an...
Jérôme Petazzoni
 
PDF
Containerization is more than the new Virtualization: enabling separation of ...
Jérôme Petazzoni
 
PDF
Pipework: Software-Defined Network for Containers and Docker
Jérôme Petazzoni
 
PDF
Introduction to Docker at Glidewell Laboratories in Orange County
Jérôme Petazzoni
 
PDF
Docker en Production (Docker Paris)
Jérôme Petazzoni
 
PDF
Introduction to Docker at the Azure Meet-up in New York
Jérôme Petazzoni
 
PDF
Killer Bugs From Outer Space
Jérôme Petazzoni
 
PDF
Docker, Linux Containers (LXC), and security
Jérôme Petazzoni
 
PDF
Docker, Linux Containers, and Security: Does It Add Up?
Jérôme Petazzoni
 
PDF
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Jérôme Petazzoni
 
Use the Source or Join the Dark Side: differences between Docker Community an...
Jérôme Petazzoni
 
Containerization is more than the new Virtualization: enabling separation of ...
Jérôme Petazzoni
 
Pipework: Software-Defined Network for Containers and Docker
Jérôme Petazzoni
 
Introduction to Docker at Glidewell Laboratories in Orange County
Jérôme Petazzoni
 
Docker en Production (Docker Paris)
Jérôme Petazzoni
 
Introduction to Docker at the Azure Meet-up in New York
Jérôme Petazzoni
 
Killer Bugs From Outer Space
Jérôme Petazzoni
 
Docker, Linux Containers (LXC), and security
Jérôme Petazzoni
 
Docker, Linux Containers, and Security: Does It Add Up?
Jérôme Petazzoni
 
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Jérôme Petazzoni
 

Recently uploaded (20)

PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 

Microservices. Microservices everywhere! (At OSCON 2015)

  • 2. Who am I? French software engineer living in California Joined Docker (dotCloud) more than 4 years ago (I was at Docker before it was cool!) I have built and scaled the dotCloud PaaS I learned a few things about running containers (in production)
  • 3. Outline What are microservices? What are their challenges? How does Docker help? How can we do this today?
  • 5. Microservices: a style of software architecture Break big application down into many small services Example: e-commerce - web front-end - catalog of products - inventory/stock management - shipping calculator - payment processor - billing/invoicing - recommendation engine - user profiles
  • 6. Why are we doing this? (1/2) Use different stacks for different services (use the right language/tool for the job) Replace or refactor individual services easily Less coordination required when deploying - deploy more often - less risk - more agility and speed
  • 7. Why are we doing this? (2/2) Promotes many small teams instead of one big army - smaller teams = less communication overhead - see Jeff Bezos' "two-pizza rule" Enables effective ownership of services - a service always has an "owner" (=team) - the owner is responsible (=on call) - the owner is empowered (=can fix things)
  • 8. What are the challenges associated with microservices?
  • 9. Fast, efficient RPC calls Docker does not help with that. See instead: - ZeroRPC - Cap'n Proto - XMLRPC - SOAP - Dnode - REST - Queues (like AMQP), for long-running/async operations
  • 10. Architecturing the application in small blocks Docker does not help with that. Some tips: - Pretend that you're outsourcing parts of your stack - Wrap database access; each object (or table) = one service
  • 11. Efficient deployment system Instead of deploying one monolith once in a while, we deploy many services very frequently The manual, tedious, uniquely tailored deployment system has to be replaced with something simple and reliable It must be easy to add new components and deploy them Docker does help with that.
  • 12. Network plumbing Instead of one monolith talking to a database, we now have 100s of services talking to each other Those services will often be scaled independently Instead of direct, deterministic library calls, we now have network calls across load balancers Scaling, load balancing, monitoring must be easy to do Docker does help with that.
  • 13. More challenges See Microservices: not a free lunch[1], by Benjamin Wootton. [1] http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
  • 14. How does Docker help us to implement microservices?
  • 15. Building code, without Docker Deployment scripts are fragile Configuration management is hard (and not a silver bullet) Environments differ: - from dev to dev - from dev to prod
  • 16. Building code, with Docker Write a Dockerfile for each component Builds are fast - each build step is saved - future builds will reuse saved steps Builds are reproducible - build environment can be well-defined - outside context is limited
  • 18. Shipping code, without Docker Push code or build artifacts to servers Distro packages (deb, rpm...) are great, but hard to build (too generic) Artifact libraries are great, but tailored to specific languages (too specific) When deployment fails, rollback isn't guaranteed to work
  • 19. Shipping code, with Docker Container images can be pushed to registries Container engines can pull from those registries Docker Inc. provides a free registry (the Docker Hub) Works out of the box in 2 minutes (includes account creation and engine setup) Can also be deployed on prem Rollbacks are easy (see: immutable infrastructure with containers)
  • 21. Network plumbing, without Docker Application code must be modified to handle: - service discovery (e.g. lookup endpoint addresses into Consul, Etcd, ZK) - failover (same, but also needs to watch for changes) Development stack becomes either: - very complex (because of those extra components) - different from production (because the code path differs)
  • 22. Network plumbing, with Docker Application code doesn't deal with plumbing Application code connects to services using DNS aliases DNS aliases are injected by Docker (as entries in /etc/hosts) In dev, DNS aliases map directly to service containers In prod, DNS aliases map to special-purpose containers, implementing service discovery, load-balancing, failover Those containers are called ambassadors
  • 24. How can we do this today?
  • 25. Developing on a single node Docker Compose Describe a stack of containers in a simple YAML file Start the stack with a single command Compose connects containers together with links Also provides simple scaling and log aggregation
  • 27. Scaling with static resource scheduling Docker Compose + Docker remote API Deploy stateful services separately Replace them with ambassadors in the stack Instantiate the stack multiple times Fits well with existing IAAS auto-scaling models
  • 29. Scaling with dynamic resource scheduling Docker Compose + Docker Swarm Swarm consolidates multiple Docker hosts into a single one Swarm "looks like" a Docker daemon, but it dispatches (schedules) your containers on multiple daemons Swarm speaks the Docker API front and back Swarm is open source and written in Go (like Docker) Swarm was started by two of the original Docker authors (@aluzzardi and @vieux) Swarm is not stable yet (version 0.3 right now)
  • 30. No live demo Video from DockerCon 2015, last month (10 minutes) https://www.youtube.com/watch?v=at72dhg-SZY&t=2600