Deployment Decoded: Understanding Types and Trade-offs

Mark Stephenson
2 min readJan 21, 2024

Deployment Types and their Pros and Cons

Deploying applications is a critical aspect of the software development lifecycle. You’ve built your killer feature, now you need to get it in front of your users.

Whenever you deploy code you should be asking yourself (at least) the two following questions:

  • Will this result in downtime?
  • What happens if I need to rollback?

There are many strategies you can use to deliver your application; in this guide, we’ll explore four common deployment types — In place, Rolling, Immutable, and Red/Green together with some of their benefits and flaws.

In Place Deployment:

Pros:

  • Simple Process: In-place deployment is straightforward. You update the application on the existing servers without creating new instances.
  • Cost-Effective: Since you use existing infrastructure, there are usually no additional costs.

Cons:

  • Downtime: During the deployment, the application may experience downtime as the new version replaces the old one.
  • Rollback Challenges: Rolling back can be challenging, especially if issues arise mid-deployment.

Rolling Deployment:

Pros:

  • Continuous Availability: Rolling deployments reduce downtime by updating a subset of servers at a time, ensuring the application remains available.
  • Easy Rollback: If issues occur, rolling back is simpler as it involves reverting the changes on the affected servers.

Cons:

  • Complexity: Coordinating updates across multiple servers can be complex.
  • Potential for Version Mismatch: During the deployment process, different versions of the application may coexist, posing compatibility challenges.

Immutable Deployment:

Pros:

  • Consistency: Immutable deployments create new instances for each update, ensuring consistency across servers.
  • Easy Rollback: Rolling back is seamless as it involves redirecting traffic to the previous, unchanged instances.

Cons:

  • Resource Intensive: Creating new instances can be resource-intensive, requiring additional infrastructure.
  • Initial Setup Overhead: Implementing immutable deployments may involve a higher initial setup overhead.

Red/Green Deployment:

Pros:

  • Zero Downtime: Red/Green deployments eliminate downtime by running the old and new versions simultaneously, switching only when ready.
  • Quick Rollback: Rolling back involves redirecting traffic to the previous version, ensuring a quick recovery.

Cons:

  • Resource Utilisation: Running two versions simultaneously may require additional resources.
  • Complexity: Setting up the infrastructure to manage dual instances can be complex.

Summary

Your choice of deployment type depends on factors like the application’s criticality, infrastructure, and the tolerance for downtime. Consider these pros and cons to make an informed decision for your next deployment.

+----------------------+-------------------+----------------------+--------------------------+-----------------------------+
| Deployment Type | Downtime | Rollback Ease | Resource Impact | Complexity |
+----------------------+-------------------+----------------------+--------------------------+-----------------------------+
| In Place | Yes | Challenging | Low | Moderate |
| Rolling | Minimal | Relatively Easy | Moderate | Complex |
| Immutable | Minimal/None | Simple | High | Initial Setup Overhead |
| Red/Green | No | Quick and Simple | Moderate | Moderate |
+----------------------+-------------------+----------------------+--------------------------+-----------------------------+

--

--