Scaling out our Docker applications
Now, suppose that the workload in the previous section starts to overload each of our three Docker hosts. Without a load balancer such as our preceding NGINX setup, our application's performance will start to degrade. This may mean a lower quality of service to our application's users or being paged in the middle of the night to perform heroic systems operations. However, with a load balancer managing the connections to our applications, it is very simple to add more capacity to scale out the performance of our application.
As our application is already designed to be load balanced, our scale-out process is very simple. The only thing we need to do is update the number of replicas of our application in the compose-lb.yml
file:
--- version: '3.7' services: nginx: image: nginx:stable ports: - '80:80' configs: - source: nginx.conf target: /etc/nginx/nginx.conf app_green: image: hubuser/app:1.0.0 deploy: replicas...