SlideShare a Scribd company logo
D CKER

SWARM MODE

ORCHESTRATION
ALİCAN AKKUŞ
software developer@iyzico @alican_akkus /aakkus alicanakkus.github.io - alicanakkus.com
DOCKER SWARM MODE
What will we be doing today?
‣ Clustering and container scheduling
‣ Understandable Distributed Consensus
‣ Build a swarm cluster
‣ One or more node will be manager
‣ Two or more node will be worker
‣ A sample app that uses a Java Spring Boot backend connected to a database to
display a fictitious art shop with a React front-end.
‣ Scale the number of containers in the swarm.
2
DOCKER SWARM MODE
Clustering and Container scheduling
‣ Orchestration is a broad term that refers to container scheduling, cluster management, and possibly the
provisioning of additional hosts.
‣ In this environment, "scheduling" refers to the ability for an administrator to load a service file onto a host system
that establishes how to run a specific container. 



While scheduling refers to the specific act of loading the service definition, in a more general sense, schedulers
are responsible for hooking into a host's init system to manage services in whatever capacity needed.
‣ Cluster management is the process of controlling a group of hosts. This can involve adding and removing hosts
from a cluster, getting information about the current state of hosts and containers, 

and starting and stopping processes. 



Cluster management is closely tied to scheduling because the scheduler must have access 

to each host in the cluster in order to schedule services. 

For this reason, the same tool is often used for both purposes.
3
DOCKER SWARM MODE
Swarm Mode Features
‣ The cluster management and orchestration features embedded in the Docker Engine.

‣ You enable swarm mode for an engine by either initializing a swarm or joining an existing
swarm.

‣ Docker provides isolation but Swarm mode provides scalability.

‣ With a single engine, applications can be scaled out faster and more effectively. 

‣ Swarm can scale up to 50,000 containers and 1,000 nodes with no effect on performance as
new containers are added to the cluster.
4
DOCKER SWARM MODE
Swarm Mode Features
‣ Declarative service model ; 

Docker Engine uses a declarative approach to let you define the desired state of the various services in
your application stack. For example, you might describe an application comprised of a web front end
service with message queueing services and a database backend.

‣ Scaling ; 

For each service, you can declare the number of tasks you want to run. When you scale up or down, the
swarm manager automatically adapts by adding or removing tasks to maintain the desired state.

‣ Desired state reconciliation ; 

The swarm manager node constantly monitors the cluster state and reconciles any differences between 

the actual state and your expressed desired state. 

For example, if you set up a service to run 10 replicas of a container, and a worker machine hosting 

two of those replicas crashes, the manager will create two new replicas to replace the replicas that
crashed. 

The swarm manager assigns the new replicas to workers that are running and available.
5
DOCKER SWARM MODE
Swarm Mode Features
‣ Multi-host networking ; 



You can specify an overlay network for your services. The swarm manager automatically assigns
addresses to the containers on the overlay network when it initializes or updates the application.

‣ Load balancing ; 



You can expose the ports for services to an external load balancer. Internally, the swarm lets you
specify how to distribute service containers between nodes.

‣ Secure by default ; 



Each node in the swarm enforces TLS mutual authentication and encryption to secure 

communications between itself and all other nodes. 

You have the option to use self-signed root certificates or certificates from a custom root CA.
6
DOCKER SWARM MODE
Swarm Mode Features
‣ Rolling updates ; 



At rollout time you can apply service updates to nodes incrementally. The swarm manager lets
you control the delay between service deployment to different sets of nodes. If anything goes
wrong, you can roll-back a task to a previous version of the service.



‣ Service discovery ; 



 Swarm manager nodes assign each service in the swarm a unique DNS name and load
balances running containers. You can query every container running in the swarm through a
DNS server embedded in the swarm.

7
DOCKER SWARM MODE
Distributed Consensus - RAFT
‣ Consensus is a fundamental problem in fault-tolerant distributed systems. Consensus involves multiple servers agreeing on values.

‣ Raft is a consensus algorithm that is designed to be easy to understand. It's equivalent to Paxos in fault-tolerance and
performance. 

‣ A node can be in 1 of 3 states:
‣ the Follower state
‣ the Candidate state
‣ or the Leader state

‣ All our nodes start in the follower state. If followers don't hear from a leader then they can become a candidate.

‣ Once they reach a decision on a value, that decision is final.

‣ Raft tolerates up to (N-1)/2 failures and requires a majority or quorum of (N/2)+1 members to 

agree on values proposed to the cluster. 

‣ For example; a cluster of 5 servers can continue to operate even if 2 servers fail. 

If more servers fail, they stop making progress.
8
DOCKER SWARM MODE
Swarm Mode Features
9
DOCKER SWARM MODE
Swarm Mode Features
10
DOCKER SWARM MODE
Swarm Mode Features
11
DOCKER SWARM MODE
Docker Swarm Mode
‣ initalize swarm;
docker swarm init

‣ Once you’ve created a swarm with a manager node, you’re ready to add worker nodes.
docker swarm join --token SWTKN-1-231 192.168.99.100:2377

‣ you can join to swarm as manage or worker.

‣ run the docker node ls command to see the worker nodes;

* Swarm management commands like docker node ls only work on manager nodes.
id hostname status availability manager status
03g1y59jwfg7cf worker2 Ready Active -
a9j68exjopxe7w worker1 Ready Active -
dxn1zf6l61qsb * manager1 Ready Active Leader
12
DOCKER SWARM MODE
DEMO
‣ A sample app that uses a Java Spring Boot backend connected to a database to display a
fictitious art shop with a React front-end.

‣ We’ve 3 swarm nodes(one manager and two worker)

‣ https://github.com/AlicanAkkus/atsea-sample-shop-app
13
DOCKER SWARM MODE
THANKS :)

More Related Content

What's hot

Going Production with Docker and Swarm
Going Production with Docker and SwarmGoing Production with Docker and Swarm
Going Production with Docker and Swarm
C4Media
 
The age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster managementThe age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster management
Nicola Paolucci
 
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Docker, Inc.
 
Docker swarm reloaded
Docker swarm reloadedDocker swarm reloaded
Docker swarm reloaded
Govinda Fichtner
 
Docker swarm introduction
Docker swarm introductionDocker swarm introduction
Docker swarm introduction
Evan Lin
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introduction
rajdeep
 
Containers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. KubernetesContainers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. Kubernetes
Dmitry Lazarenko
 
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Mike Goelzer
 
Docker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker SwarmDocker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker Swarm
Elton Stoneman
 
Swarm - A Docker Clustering System
Swarm - A Docker Clustering SystemSwarm - A Docker Clustering System
Swarm - A Docker Clustering System
snrism
 
What's New in Docker 1.12?
What's New in Docker 1.12?What's New in Docker 1.12?
What's New in Docker 1.12?
Ajeet Singh Raina
 
Chef cookbooks for OpenStack HA
Chef cookbooks for OpenStack HAChef cookbooks for OpenStack HA
Chef cookbooks for OpenStack HA
Adam Spiers
 
Docker Online Meetup #28: Production-Ready Docker Swarm
Docker Online Meetup #28: Production-Ready Docker SwarmDocker Online Meetup #28: Production-Ready Docker Swarm
Docker Online Meetup #28: Production-Ready Docker Swarm
Docker, Inc.
 
Docker swarm workshop
Docker swarm workshopDocker swarm workshop
Docker swarm workshop
Luis Borbon
 
Docker Swarm & Machine
Docker Swarm & MachineDocker Swarm & Machine
Docker Swarm & Machine
Eueung Mulyana
 
Docker swarm
Docker swarmDocker swarm
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Giovanni Toraldo
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
Mike Goelzer
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web Developers
Amr Fawzy
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015
Chris Ciborowski
 

What's hot (20)

Going Production with Docker and Swarm
Going Production with Docker and SwarmGoing Production with Docker and Swarm
Going Production with Docker and Swarm
 
The age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster managementThe age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster management
 
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
 
Docker swarm reloaded
Docker swarm reloadedDocker swarm reloaded
Docker swarm reloaded
 
Docker swarm introduction
Docker swarm introductionDocker swarm introduction
Docker swarm introduction
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introduction
 
Containers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. KubernetesContainers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. Kubernetes
 
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
 
Docker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker SwarmDocker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker Swarm
 
Swarm - A Docker Clustering System
Swarm - A Docker Clustering SystemSwarm - A Docker Clustering System
Swarm - A Docker Clustering System
 
What's New in Docker 1.12?
What's New in Docker 1.12?What's New in Docker 1.12?
What's New in Docker 1.12?
 
Chef cookbooks for OpenStack HA
Chef cookbooks for OpenStack HAChef cookbooks for OpenStack HA
Chef cookbooks for OpenStack HA
 
Docker Online Meetup #28: Production-Ready Docker Swarm
Docker Online Meetup #28: Production-Ready Docker SwarmDocker Online Meetup #28: Production-Ready Docker Swarm
Docker Online Meetup #28: Production-Ready Docker Swarm
 
Docker swarm workshop
Docker swarm workshopDocker swarm workshop
Docker swarm workshop
 
Docker Swarm & Machine
Docker Swarm & MachineDocker Swarm & Machine
Docker Swarm & Machine
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web Developers
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015
 

Similar to Docker Swarm Mode Orchestration

FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
Federico Michele Facca
 
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-orsCharacterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
Sonatype
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
Jakub Hajek
 
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub HajekJDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
PROIDEA
 
Container orchestration from theory to practice
Container orchestration from theory to practiceContainer orchestration from theory to practice
Container orchestration from theory to practice
Docker, Inc.
 
Orchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failuresOrchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failures
Docker, Inc.
 
Docker Swarm vs. Kubernetes Which is the best
Docker Swarm vs. Kubernetes Which is the bestDocker Swarm vs. Kubernetes Which is the best
Docker Swarm vs. Kubernetes Which is the best
Calidad Infotech
 
Container World 2017 - Characterizing and Contrasting Container Orchestrators
Container World 2017 - Characterizing and Contrasting Container OrchestratorsContainer World 2017 - Characterizing and Contrasting Container Orchestrators
Container World 2017 - Characterizing and Contrasting Container Orchestrators
Lee Calcote
 
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSPutting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Lightbend
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting Techniques
Sreenivas Makam
 
Higher order infrastructure: from Docker basics to cluster management - Nicol...
Higher order infrastructure: from Docker basics to cluster management - Nicol...Higher order infrastructure: from Docker basics to cluster management - Nicol...
Higher order infrastructure: from Docker basics to cluster management - Nicol...
Codemotion
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
Velocidex Enterprises
 
Container Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeContainer Orchestration from Theory to Practice
Container Orchestration from Theory to Practice
Docker, Inc.
 
What is the Difference Between Kubernetes and Docker?
What is the Difference Between Kubernetes and Docker?What is the Difference Between Kubernetes and Docker?
What is the Difference Between Kubernetes and Docker?
Ravendra Singh
 
9th docker meetup 2016.07.13
9th docker meetup 2016.07.139th docker meetup 2016.07.13
9th docker meetup 2016.07.13
Amrita Prasad
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
Will Hall
 
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster RecoveryStop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
DoKC
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & Asterisk
Evan McGee
 
Docker swarm - An introduction to Docker native clustering
Docker swarm - An introduction to Docker native clusteringDocker swarm - An introduction to Docker native clustering
Docker swarm - An introduction to Docker native clustering
Shantanu Deshpande
 

Similar to Docker Swarm Mode Orchestration (20)

FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-orsCharacterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
 
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub HajekJDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
 
Container orchestration from theory to practice
Container orchestration from theory to practiceContainer orchestration from theory to practice
Container orchestration from theory to practice
 
Orchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failuresOrchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failures
 
Docker Swarm vs. Kubernetes Which is the best
Docker Swarm vs. Kubernetes Which is the bestDocker Swarm vs. Kubernetes Which is the best
Docker Swarm vs. Kubernetes Which is the best
 
Container World 2017 - Characterizing and Contrasting Container Orchestrators
Container World 2017 - Characterizing and Contrasting Container OrchestratorsContainer World 2017 - Characterizing and Contrasting Container Orchestrators
Container World 2017 - Characterizing and Contrasting Container Orchestrators
 
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSPutting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting Techniques
 
Higher order infrastructure: from Docker basics to cluster management - Nicol...
Higher order infrastructure: from Docker basics to cluster management - Nicol...Higher order infrastructure: from Docker basics to cluster management - Nicol...
Higher order infrastructure: from Docker basics to cluster management - Nicol...
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
 
Container Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeContainer Orchestration from Theory to Practice
Container Orchestration from Theory to Practice
 
What is the Difference Between Kubernetes and Docker?
What is the Difference Between Kubernetes and Docker?What is the Difference Between Kubernetes and Docker?
What is the Difference Between Kubernetes and Docker?
 
9th docker meetup 2016.07.13
9th docker meetup 2016.07.139th docker meetup 2016.07.13
9th docker meetup 2016.07.13
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
 
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster RecoveryStop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & Asterisk
 
Docker swarm - An introduction to Docker native clustering
Docker swarm - An introduction to Docker native clusteringDocker swarm - An introduction to Docker native clustering
Docker swarm - An introduction to Docker native clustering
 

Recently uploaded

UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
devvsandy
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 

Recently uploaded (20)

UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 

Docker Swarm Mode Orchestration

  • 1. D CKER
 SWARM MODE
 ORCHESTRATION ALİCAN AKKUŞ software developer@iyzico @alican_akkus /aakkus alicanakkus.github.io - alicanakkus.com
  • 2. DOCKER SWARM MODE What will we be doing today? ‣ Clustering and container scheduling ‣ Understandable Distributed Consensus ‣ Build a swarm cluster ‣ One or more node will be manager ‣ Two or more node will be worker ‣ A sample app that uses a Java Spring Boot backend connected to a database to display a fictitious art shop with a React front-end. ‣ Scale the number of containers in the swarm. 2
  • 3. DOCKER SWARM MODE Clustering and Container scheduling ‣ Orchestration is a broad term that refers to container scheduling, cluster management, and possibly the provisioning of additional hosts. ‣ In this environment, "scheduling" refers to the ability for an administrator to load a service file onto a host system that establishes how to run a specific container. 
 
 While scheduling refers to the specific act of loading the service definition, in a more general sense, schedulers are responsible for hooking into a host's init system to manage services in whatever capacity needed. ‣ Cluster management is the process of controlling a group of hosts. This can involve adding and removing hosts from a cluster, getting information about the current state of hosts and containers, 
 and starting and stopping processes. 
 
 Cluster management is closely tied to scheduling because the scheduler must have access 
 to each host in the cluster in order to schedule services. 
 For this reason, the same tool is often used for both purposes. 3
  • 4. DOCKER SWARM MODE Swarm Mode Features ‣ The cluster management and orchestration features embedded in the Docker Engine.
 ‣ You enable swarm mode for an engine by either initializing a swarm or joining an existing swarm.
 ‣ Docker provides isolation but Swarm mode provides scalability.
 ‣ With a single engine, applications can be scaled out faster and more effectively. 
 ‣ Swarm can scale up to 50,000 containers and 1,000 nodes with no effect on performance as new containers are added to the cluster. 4
  • 5. DOCKER SWARM MODE Swarm Mode Features ‣ Declarative service model ; 
 Docker Engine uses a declarative approach to let you define the desired state of the various services in your application stack. For example, you might describe an application comprised of a web front end service with message queueing services and a database backend.
 ‣ Scaling ; 
 For each service, you can declare the number of tasks you want to run. When you scale up or down, the swarm manager automatically adapts by adding or removing tasks to maintain the desired state.
 ‣ Desired state reconciliation ; 
 The swarm manager node constantly monitors the cluster state and reconciles any differences between 
 the actual state and your expressed desired state. 
 For example, if you set up a service to run 10 replicas of a container, and a worker machine hosting 
 two of those replicas crashes, the manager will create two new replicas to replace the replicas that crashed. 
 The swarm manager assigns the new replicas to workers that are running and available. 5
  • 6. DOCKER SWARM MODE Swarm Mode Features ‣ Multi-host networking ; 
 
 You can specify an overlay network for your services. The swarm manager automatically assigns addresses to the containers on the overlay network when it initializes or updates the application.
 ‣ Load balancing ; 
 
 You can expose the ports for services to an external load balancer. Internally, the swarm lets you specify how to distribute service containers between nodes.
 ‣ Secure by default ; 
 
 Each node in the swarm enforces TLS mutual authentication and encryption to secure 
 communications between itself and all other nodes. 
 You have the option to use self-signed root certificates or certificates from a custom root CA. 6
  • 7. DOCKER SWARM MODE Swarm Mode Features ‣ Rolling updates ; 
 
 At rollout time you can apply service updates to nodes incrementally. The swarm manager lets you control the delay between service deployment to different sets of nodes. If anything goes wrong, you can roll-back a task to a previous version of the service.
 
 ‣ Service discovery ; 
 
  Swarm manager nodes assign each service in the swarm a unique DNS name and load balances running containers. You can query every container running in the swarm through a DNS server embedded in the swarm.
 7
  • 8. DOCKER SWARM MODE Distributed Consensus - RAFT ‣ Consensus is a fundamental problem in fault-tolerant distributed systems. Consensus involves multiple servers agreeing on values.
 ‣ Raft is a consensus algorithm that is designed to be easy to understand. It's equivalent to Paxos in fault-tolerance and performance. 
 ‣ A node can be in 1 of 3 states: ‣ the Follower state ‣ the Candidate state ‣ or the Leader state
 ‣ All our nodes start in the follower state. If followers don't hear from a leader then they can become a candidate.
 ‣ Once they reach a decision on a value, that decision is final.
 ‣ Raft tolerates up to (N-1)/2 failures and requires a majority or quorum of (N/2)+1 members to 
 agree on values proposed to the cluster. 
 ‣ For example; a cluster of 5 servers can continue to operate even if 2 servers fail. 
 If more servers fail, they stop making progress. 8
  • 9. DOCKER SWARM MODE Swarm Mode Features 9
  • 10. DOCKER SWARM MODE Swarm Mode Features 10
  • 11. DOCKER SWARM MODE Swarm Mode Features 11
  • 12. DOCKER SWARM MODE Docker Swarm Mode ‣ initalize swarm; docker swarm init
 ‣ Once you’ve created a swarm with a manager node, you’re ready to add worker nodes. docker swarm join --token SWTKN-1-231 192.168.99.100:2377
 ‣ you can join to swarm as manage or worker.
 ‣ run the docker node ls command to see the worker nodes;
 * Swarm management commands like docker node ls only work on manager nodes. id hostname status availability manager status 03g1y59jwfg7cf worker2 Ready Active - a9j68exjopxe7w worker1 Ready Active - dxn1zf6l61qsb * manager1 Ready Active Leader 12
  • 13. DOCKER SWARM MODE DEMO ‣ A sample app that uses a Java Spring Boot backend connected to a database to display a fictitious art shop with a React front-end.
 ‣ We’ve 3 swarm nodes(one manager and two worker)
 ‣ https://github.com/AlicanAkkus/atsea-sample-shop-app 13