Overview

Recreate Deployment, also known as “Red/Black Deployment,” involves completely shutting down the current application version before deploying a new one. It is straightforward but can cause downtime.

Key Concepts

  1. Current Version: The existing application version.
  2. New Version: The updated application version.

Deployment Steps

  1. Prepare New Version: Ensure it is fully developed and tested.
  2. Shut Down Current Version: Stop all instances of the current version.
  3. Deploy New Version: Set up and deploy the new version.
  4. Start New Version: Begin handling user traffic with the new version.
  5. Verify Deployment: Monitor the new version to ensure it runs correctly.

Advantages

  • Simplicity: Straightforward process with clear cutover.
  • Resource Efficiency: Only one version runs at a time.
  • Complete Replacement: Eliminates old version completely.

Challenges

  • Downtime: Period of unavailability during the switch.
  • Risk of Failure: Entire application might be affected if issues arise.
  • No Immediate Rollback: Rolling back can be complex and time-consuming.

Example Use Cases

  • Non-Critical Applications: Suitable where downtime is acceptable.
  • Small Scale Deployments: Ideal for smaller environments.
  • Early Development Stages: Useful in early development or internal environments.

Comparison with Other Deployment Strategies

  • AB Testing Deployment: Recreate involves shutting down the current version, while A/B Testing runs two versions simultaneously.
  • Blue-Green Deployment: Recreate causes downtime, while Blue-Green ensures continuous availability.
  • Canary Release: Recreate switches versions completely, whereas Canary gradually introduces the new version.
  • Rolling Deployment: Recreate has downtime, while Rolling updates instances gradually to avoid it.
  • Shadow Deployment: Shadow Deployment tests without user impact, while Recreate involves a full cutover.