12 Understanding Orchestration: Docker Swarm and Kubernetes
We're halfway through our container journey together and by now you should be pretty comfortable packaging and running applications with Docker and Docker Compose. The next step is understanding how those applications run in a production environment, where you have many machines running Docker to give you high availability and the power to handle lots of incoming traffic.
In that environment your apps still run in containers using the same Docker images you run locally, but there's a management layer which takes care of co-ordinating all the machines and running the containers for you. That's called orchestration and the two main container orchestrators are Docker Swarm and Kubernetes. They share a lot of the same features and capabilities, but Kubernetes is a complex system which needs a Month of Lunches to itself. In this chapter you're going to learn about orchestration using Docker Swarm, which is a powerful production-grade container orchestrator built right into Docker. Even if your ultimate goal is to learn Kubernetes, it's good to start with Swarm - the Kubernetes learning curve is steep, but it's much easier when you already know Swarm.