Docker swarm

TOPICS

  • Container Orchestration
  • Docker Swarm Intro
  • Key Concepts
Clustering
Scheduling
Fault Tolerance
Load Balancing
Scaling
Application
Deployments

Features

SWARM
Kubernetes
Mesos and Marathon

orchestrators

swarm

  • Native Docker Orchestration Engine
  • May become a norm in future 
  • Compatible with Docker Compose
  • Integrated with Docker Engine and CLI

KEY CONCEPTS

  • Architecture
  • Services
    
  • Scheduling 
  • Networking
  • Load Balancing 
  • Fault Tolerance 
  • Zero Downtime Deployment

 

gossip

raft

managers
workers

services

  • Unit of deployment
  • One or more containers
  • Global or Replicated
    

replicated

replicas = 5

global

  • one per node
  • useful to setup monitoring, logging agents etc.

scheduling

node1
node2
node3
  • resource aware
  • spreads by default
  • placement constraints can be defined
 deploy:
      placement:
        constraints:
          - node.role == worker
          - node.labels.env = staging
          - node.hostname != node-2
          - engine.labels.os == opensuse

placement constraints

networking

node1
node2
node3

bridge

overlay

  • overlay
  • ingress
  • docker_gwbridge

80

swarm LB
swarm LB
swarm LB
published port
81
81
81

80

External Load Balancer

load balancing

node1
node2
node3

fault tolerance

node1
node2
node3

fault tolerance

node1
node2
node3

Docker swarm

By School of Devops

Docker swarm

Container Orchestration with SWARM

  • 1,055