Docker Swarm Mode

large h trans

Docker Meetup Hamburg · September 13th, 2016

tgbyte bk
Thilo-Alexander Ginkel · TG Byte Software GmbH
[email protected] ·

About us

TG Byte Software GmbH

  • Founded in 1998, located in Hamburg

  • Service Range

    • Software Development & Consulting

    • DevOps

    • Training & Coaching

  • Looking for freelancers to support us with various projects

Thilo-Alexander Ginkel

  • Passionate Software Engineer, IT Consultant & Trainer

  • Focus

    • Software Development & Architecture

    • DevOps

    • Troubleshooting

  • Software Development since 1994

Docker Swarm Mode

Docker Swarm Mode

  • Cluster management integrated with Docker Engine

    • Accessible via the regular Docker CLI

  • Built on top of SwarmKit (using Raft Consensus Algorithm)

    • Self-organizing (no dedicated cluster coordinator required)

  • New "service" concept as an abstraction on top of containers

  • Multi-host overlay networking

  • Service Discovery via DNS

  • Introduced in Docker 1.12

  • Not to be confused with the standalone Docker Swarm product

Docker Swarm Mode


swarm diagram

Docker Swarm Mode


  • Enables Docker Engine to assess the health state of a container

  • Exit code indicates success (exit code 0) or failure (exit code 1)

  • Enables Docker Swarm Mode to direct inbound traffic only to healthy containers

  • Example

HEALTHCHECK --interval=15s --timeout=5s CMD curl --fail \
  http://localhost:2368/ || exit 1




  • Stateful web application

    • "Ghost" blogging platform

    • MySQL database

  • Three nodes on Google Compute Engine

    • Running Docker 1.12.1 in Swarm Mode

  • Google Cloud load balancing for HTTPS termination and (pseudo-)HA



Wrap-up & Outlook


Thank you!

Image Credits