Today we are excited to introduce Rails Rolling Deployments to all of our Rails customers. Let's jump right in!
What are Rolling Deployments?
Until now, Cloud 66 for Rails, supported 2 different deployment strategies: Serial and Parallel Deployments.
In a Serial Deployment, the application is deployed to each of your servers one server at a time. Each server is taken offline (off the load balancer) and deployed before being put back online. This makes deployments more stable (a failed deployment is going to be detected early without disrupting production) and predictable, but natually slower.
Parallel deployments, as the name suggests, are when the application is deployed to all of the servers at the same time. This makes them fast, but also they can be risky if there are issues during the deployment, like undetected bugs that can be rolled out to all of your servers at the same time.
Rolling Deployments are the best of both worlds: in a Rolling Deployment, your servers are put into 2 groups (we name them Saphire and Emerald). Each group is then taken offline and the application is deployed to all of its servers in parallel. The health of the new deployment is then tested on the first group before it is put back online. Once online, the second group is taken offline for deployment and then put back online after its health is established. If at any point during deployment something goes wrong (bad server, network issues, code bugs, ...) production is not disrupted as the other group will serve the old code until the issue can be resolved on the new servers.
When to use Rolling Deployments?
Technically Rolling Deployments are the best option to choose whenever you want to deploy your Rails applications to production. They fit most use cases for any production stack. To use Rolling Deployments you need at least 4 servers in your stack. Also, you need to be comfortable with running on half capacity in case one deployment group fails. This means spending some time on server capacity planning and looking at your traffic and workload patterns to make sure your production stack servers have enough spare capacity during a possible failure.
As I mentioned before, our Rails products are always improving in quality and new features and Rolling Deployments are one of the many new features we're shipping this year to make them even better. Our team can't wait to see how you use Cloud 66 Rails for next!
Rolling Deployments are available to all Cloud 66 for Rails customers starting today.
See our documentation about Rails deployment strategies.