Deploying applications in parallel

When you deploy in parallel, all the deployment tasks for the servers in your application will run in parallel as opposed to running in serial. In other words, the tasks will run against each server simultaneously instead of running on one server at a time. For large applications, this can have significant time benefits.

Deploying in serial involves removing each server from your load balancer, deploying to it, and re-adding it to the load balancer. When you deploy in parallel, your servers won’t be removed from the load balancer, because you could end up with no servers serving the load balancer if this were the case.

Note

To run database migrations during deployment, it is advisable to deploy in serial.

Although database migrations only occur on one server, depending on the changes, they could stop deployments on other servers from succeeding. Refer to our page on controlling your database migrations for more information.

Configure parallel deployment

To activate parallel deployments, access your Application settings via Toolbelt and set deploy.parallel to true.

$ cx settings set -s my_app_name deploy.parallel true

Once set, any future deployments will be done in parallel. Should you wish to do a one-off deployment in serial, you can do so by clicking Deploy -> Deploy with options and selecting Deploy in serial. Similarly, if you have your application set to deploy in serial, you can perform a one-off deploying in parallel through this menu.