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
PDF
Introduction to Docker storage, volume and image
PDF
Containers: The What, Why, and How
PDF
Docker Tutorial.pdf
PPTX
Docker Networking Overview
PPTX
Docker and kubernetes
PPTX
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
PDF
Docker by Example - Basics
Docker Swarm for Beginner
Introduction to Docker storage, volume and image
Containers: The What, Why, and How
Docker Tutorial.pdf
Docker Networking Overview
Docker and kubernetes
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker by Example - Basics

What's hot (20)

PDF
Introduction to Docker Compose
PPTX
Introduction to kubernetes
PDF
Docker Swarm 0.2.0
PPTX
Docker introduction (1)
PDF
Introduction to container based virtualization with docker
PPTX
Docker introduction
PPTX
Docker: From Zero to Hero
PPTX
Docker Swarm Introduction
PPTX
Docker 101 : Introduction to Docker and Containers
PDF
Docker 101: Introduction to Docker
PPTX
Docker introduction & benefits
PPTX
Kubernetes for Beginners: An Introductory Guide
PDF
Kubernetes Introduction
PDF
Introduction to Kubernetes Workshop
PPTX
Introduction to helm
PDF
Hands-On Introduction to Kubernetes at LISA17
PDF
Docker Introduction
PDF
Docker Compose by Aanand Prasad
PPTX
Introduction to Kubernetes
Introduction to Docker Compose
Introduction to kubernetes
Docker Swarm 0.2.0
Docker introduction (1)
Introduction to container based virtualization with docker
Docker introduction
Docker: From Zero to Hero
Docker Swarm Introduction
Docker 101 : Introduction to Docker and Containers
Docker 101: Introduction to Docker
Docker introduction & benefits
Kubernetes for Beginners: An Introductory Guide
Kubernetes Introduction
Introduction to Kubernetes Workshop
Introduction to helm
Hands-On Introduction to Kubernetes at LISA17
Docker Introduction
Docker Compose by Aanand Prasad
Introduction to Kubernetes
Ad

Similar to Docker swarm (20)

PDF
Orchestrating Linux Containers while tolerating failures
PDF
Deep Dive into Docker Swarm Mode
PDF
Dokcer swarm
PDF
Docker Swarm Mode Orchestration
PDF
What's New in Docker 1.12?
PPTX
Introduction To Docker, Docker Compose, Docker Swarm
PDF
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
PDF
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
PDF
New Docker Features for Orchestration and Containers
PDF
Higher order infrastructure: from Docker basics to cluster management - Nicol...
PDF
Docker swarm introduction
PDF
Docker swarm reloaded
PDF
PPTX
A docker love story
PDF
Docker 1.12 and SwarmKit
PPTX
Codemotion Rome 2018 Docker Swarm Mode
PPTX
Introducing Docker Swarm - the orchestration tool by Docker
PDF
swarmmode-dojo
PDF
Alibaba Cloud Conference 2016 - Docker Enterprise
PDF
Swarm mode
Orchestrating Linux Containers while tolerating failures
Deep Dive into Docker Swarm Mode
Dokcer swarm
Docker Swarm Mode Orchestration
What's New in Docker 1.12?
Introduction To Docker, Docker Compose, Docker Swarm
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
New Docker Features for Orchestration and Containers
Higher order infrastructure: from Docker basics to cluster management - Nicol...
Docker swarm introduction
Docker swarm reloaded
A docker love story
Docker 1.12 and SwarmKit
Codemotion Rome 2018 Docker Swarm Mode
Introducing Docker Swarm - the orchestration tool by Docker
swarmmode-dojo
Alibaba Cloud Conference 2016 - Docker Enterprise
Swarm mode
Ad

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
Advanced IT Governance
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Approach and Philosophy of On baking technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
KodekX | Application Modernization Development
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
Advanced IT Governance
CIFDAQ's Market Insight: SEC Turns Pro Crypto
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MYSQL Presentation for SQL database connectivity
GamePlan Trading System Review: Professional Trader's Honest Take
The Rise and Fall of 3GPP – Time for a Sabbatical?
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Approach and Philosophy of On baking technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
“AI and Expert System Decision Support & Business Intelligence Systems”
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced Soft Computing BINUS July 2025.pdf
Modernizing your data center with Dell and AMD
Per capita expenditure prediction using model stacking based on satellite ima...

Docker swarm