Scaling applications
When we receive alerts from our monitoring system, as in Chapter 3, Monitoring Docker, that the pool of Docker containers running our web application is not loaded, it is time to scale out. We accomplished this using load balancers in Chapter 7, Load Balancing. The following diagram shows the high-level architecture of the commands we ran in Chapter 7, Load Balancing:
When we decide to scale out and add an additional Docker host, we can automate the process with a Scale out orchestrator
component. This can be a series of simple shell scripts that we will install inside a build server, such as Jenkins. The orchestrator will basically ask the cloud provider API to create a New Docker Host
. This request will then provision the Docker host and run the initial bootstrap script to download the configuration from our Configuration Management System
in Chapter 2, Configuring Docker with Chef. This will then increase the number of nodes in our Docker Swarm cluster. After this...