SlideShare a Scribd company logo
Microservices and Docker Swarm
Who am I?
Alberto Guimarães Viana
Goiano, atualmente moro em Hamburg/Alemanha
E-mail: albertogviana@gmail.com
Twitter: @albertogviana
Github: https://github.com/albertogviana
Project
■ https://www.getrevue.co/profile/devops-week-news
■ https://twitter.com/devopsweeknews
Presentation
https://github.com/albertogviana/docker-swarm-presentation
What is a microservice?
■ Small, and Focused on Doing One Thing Well
■ Autonomous
Building Microservices by Sam Newman
Docker
Docker ecosystem
■ Docker Engine
■ Docker Swarm
■ Docker Registry
■ Docker Machine
■ Docker Compose
Docker Swarm
Swarm Features
■ Highly-available, distributed store based on Raft (Service discovery)
■ Cluster management integrated with Docker Engine
■ Declarative service model
■ Scaling
■ Desired state reconciliation
■ Multi-host networking
■ Load balancing
■ Secure by default
■ Rolling updates
Service Discovery
■ All other orchestration systems use a key/value store
(k8s→etcd, nomad→consul, mesos→zookeeper, etc.)
■ Swarm stores information directly in Raft
■ Analogy courtesy of @aluzzardi:
It's like B-Trees and RDBMS. They are different layers, often associated. But you don't need
to bring up a full SQL server when all you need is to index some data.
■ As a result, the orchestrator has direct access to the data
(the main copy of the data is stored in the orchestrator's memory)
■ Simpler, easier to deploy and operate; also faster
Swarm concept
■ A node can be a manager or a worker
■ A manager actively takes part in the Raft consensus
■ You can talk to a manager using the Swarm API
■ One manager is elected as the leader; other managers merely forward
requests to it
■ Using the API, you can indicate that you want to run a service
Swarm concept
■ A service is specified by its desired state: which image, how many instances...
■ The leader uses different subsystems to break down services into tasks:
orchestrator, scheduler, allocator, dispatcher
■ A task corresponds to a specific container, assigned to a specific node
■ Nodes know which tasks should be running, and will start or stop containers
accordingly (through the Docker Engine API)
Docker swarm
Swarm Mode
■ Docker Engine 1.12 features SwarmKit integration
■ The Docker CLI features three new commands:
○ docker swarm (enable Swarm mode; join a Swarm; adjust cluster
parameters)
○ docker node (view nodes; promote/demote managers; manage nodes)
○ docker service (create and manage services)
Build swarm cluster
Visualizing the cluster
Adding nodes to the cluster
Security
Under the hood
■ When we do docker swarm init, a TLS root CA is created. Then a keypair is
issued for the first node, and signed by the root CA.
■ When further nodes join the Swarm, they are issued their own keypair, signed
by the root CA, and they also receive the root CA public key and certificate.
■ All communication is encrypted over TLS.
■ The node keys and certificates are automatically renewed on regular intervals
(by default, 90 days; this is tunable with docker swarm update).
Docker Service
Routing Mesh
Routing Mesh
Scaling a service
Reverse Proxy
Dockerfile
Rolling Updates
Docker secret
Docker Node
Docker system?
What now?
Metrics
■ Prometheus
■ cAdvisor
■ InfluxDB
Logging
■ ElasticSearch, Kibana and Logstash (ELK)
■ FluentD
■ Loggly
■ Graylog
■ gliderlabs/logspout
Dashboards
■ Grafana (https://grafana.net/dashboards/609)
Book
Questions?
E-mail: albertogviana@gmail.com
Thank you! Obrigado!

More Related Content

PPTX
Docker Swarm for Beginner
Shahzad Masud
 
PDF
Introduction to Docker storage, volume and image
ejlp12
 
PDF
Docker Tutorial.pdf
MuhammadYusuf767705
 
PPTX
Docker and kubernetes
Dongwon Kim
 
PPTX
Docker Container Security
Suraj Khetani
 
PPTX
Docker Networking Overview
Sreenivas Makam
 
PDF
Containers: The What, Why, and How
Sneha Inguva
 
PPTX
What is Docker
Pavel Klimiankou
 
Docker Swarm for Beginner
Shahzad Masud
 
Introduction to Docker storage, volume and image
ejlp12
 
Docker Tutorial.pdf
MuhammadYusuf767705
 
Docker and kubernetes
Dongwon Kim
 
Docker Container Security
Suraj Khetani
 
Docker Networking Overview
Sreenivas Makam
 
Containers: The What, Why, and How
Sneha Inguva
 
What is Docker
Pavel Klimiankou
 

What's hot (20)

PDF
Docker Introduction
Peng Xiao
 
PPTX
Docker 101 : Introduction to Docker and Containers
Yajushi Srivastava
 
PPTX
Docker introduction for the beginners
Juneyoung Oh
 
PPT
Docker introduction
Phuc Nguyen
 
PPTX
Introduction to docker
Frederik Mogensen
 
PPTX
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
PPTX
Introduction to Docker
Pubudu Jayawardana
 
PDF
How to write a Dockerfile
Knoldus Inc.
 
PPTX
Docker introduction & benefits
Amit Manwade
 
PPTX
DevOps with Kubernetes
EastBanc Tachnologies
 
PPTX
Docker: From Zero to Hero
fazalraja
 
PDF
Introduction to docker
Instruqt
 
PDF
Getting Started with Kubernetes
VMware Tanzu
 
PDF
Kubernetes: A Short Introduction (2019)
Megan O'Keefe
 
PPTX
Docker introduction
dotCloud
 
PPTX
Virtualization, Containers, Docker and scalable container management services
abhishek chawla
 
PPTX
Docker introduction (1)
Gourav Varma
 
PDF
Kubernetes
erialc_w
 
PDF
Introduction to Kubernetes Workshop
Bob Killen
 
PDF
Introduction to Docker
Aditya Konarde
 
Docker Introduction
Peng Xiao
 
Docker 101 : Introduction to Docker and Containers
Yajushi Srivastava
 
Docker introduction for the beginners
Juneyoung Oh
 
Docker introduction
Phuc Nguyen
 
Introduction to docker
Frederik Mogensen
 
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Introduction to Docker
Pubudu Jayawardana
 
How to write a Dockerfile
Knoldus Inc.
 
Docker introduction & benefits
Amit Manwade
 
DevOps with Kubernetes
EastBanc Tachnologies
 
Docker: From Zero to Hero
fazalraja
 
Introduction to docker
Instruqt
 
Getting Started with Kubernetes
VMware Tanzu
 
Kubernetes: A Short Introduction (2019)
Megan O'Keefe
 
Docker introduction
dotCloud
 
Virtualization, Containers, Docker and scalable container management services
abhishek chawla
 
Docker introduction (1)
Gourav Varma
 
Kubernetes
erialc_w
 
Introduction to Kubernetes Workshop
Bob Killen
 
Introduction to Docker
Aditya Konarde
 
Ad

Similar to Docker swarm (20)

PDF
Orchestrating Linux Containers while tolerating failures
Docker, Inc.
 
PDF
Deep Dive into Docker Swarm Mode
Ajeet Singh Raina
 
PDF
Dokcer swarm
Tanmay Mehra
 
PDF
Docker Swarm Mode Orchestration
Alican Akkuş
 
PDF
What's New in Docker 1.12?
Ajeet Singh Raina
 
PPTX
Introduction To Docker, Docker Compose, Docker Swarm
An Nguyen
 
PDF
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
Docker, Inc.
 
PDF
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
PROIDEA
 
PDF
New Docker Features for Orchestration and Containers
Jeff Anderson
 
PDF
Higher order infrastructure: from Docker basics to cluster management - Nicol...
Codemotion
 
PDF
Docker swarm introduction
Evan Lin
 
PDF
Docker swarm reloaded
Govinda Fichtner
 
PDF
Docker
SangtongPeesing
 
PPTX
A docker love story
Brian de Heus
 
PDF
Docker 1.12 and SwarmKit
Gianluca Arbezzano
 
PPTX
Codemotion Rome 2018 Docker Swarm Mode
Simone Soldateschi
 
PPTX
Introducing Docker Swarm - the orchestration tool by Docker
Ramit Surana
 
PDF
swarmmode-dojo
Clarence Bakirtzidis
 
PDF
Alibaba Cloud Conference 2016 - Docker Enterprise
John Willis
 
PDF
Swarm mode
Dharmit Shah
 
Orchestrating Linux Containers while tolerating failures
Docker, Inc.
 
Deep Dive into Docker Swarm Mode
Ajeet Singh Raina
 
Dokcer swarm
Tanmay Mehra
 
Docker Swarm Mode Orchestration
Alican Akkuş
 
What's New in Docker 1.12?
Ajeet Singh Raina
 
Introduction To Docker, Docker Compose, Docker Swarm
An Nguyen
 
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
Docker, Inc.
 
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
PROIDEA
 
New Docker Features for Orchestration and Containers
Jeff Anderson
 
Higher order infrastructure: from Docker basics to cluster management - Nicol...
Codemotion
 
Docker swarm introduction
Evan Lin
 
Docker swarm reloaded
Govinda Fichtner
 
A docker love story
Brian de Heus
 
Docker 1.12 and SwarmKit
Gianluca Arbezzano
 
Codemotion Rome 2018 Docker Swarm Mode
Simone Soldateschi
 
Introducing Docker Swarm - the orchestration tool by Docker
Ramit Surana
 
swarmmode-dojo
Clarence Bakirtzidis
 
Alibaba Cloud Conference 2016 - Docker Enterprise
John Willis
 
Swarm mode
Dharmit Shah
 
Ad

Recently uploaded (20)

PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
The Future of Artificial Intelligence (AI)
Mukul
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 

Docker swarm