Continuous Deployment

Continuous Deployment is the software development practice of automatically deploying all changes that pass through the established pipelines directly to production, without manual intervention. It extends continuous delivery by automating the release process.

Goal

The goal of continuous deployment is to minimise the lead time between making a change to software and that change being used by live users, in production.

Context

Every manual step in the deployment process delays the ability for teams to get quick feedback from customers. The delays reduce the accountability of the teams as they will blame the delays and it encourages the bad behaviour of batching changes together, which increases the risk of each release and makes it harder to evaluate the impact of each change.

Deployment Approaches

Deployment ApproachDescriptionBenefitsConsiderationsBest Suited For
Blue/Green DeploymentInvolves two identical environments. One hosts the current version (Blue) while the new version (Green) is deployed and tested. Traffic is switched to Green once it's verified.
  • Minimal downtime; easy rollback.
  • Requires double the resources
  • Managing stateful applications can be complex.
  • Applications needing minimal downtime and quick rollback capabilities.
Staged (Rolling) DeploymentGradually replaces instances of the old version of an application with the new version across several stages.
  • Allows gradual exposure
  • Reduces risk by not affecting all users at once.
  • Longer rollout time
  • More complex to rollback if issues are detected late.
  • Applications where gradual rollout and minimising impact on all users simultaneously are important.
Canary DeploymentReleases the new version to a small subset of users before rolling it out to the entire user base. This "canary" serves as an early indicator of issues.
  • Early detection of potential problems
  • Reduces impact on the user base.
  • Requires robust monitoring and metrics
  • Managing different versions can be complex.
  • Applications needing real-world testing feedback before full rollout
  • Systems where reliability is critical.
Feature TogglesUses feature flags to enable or disable features without deploying new code. This allows features to be tested in production environments.
  • Flexibility in releasing and rolling back features
  • Can be used for A/B testing.
  • Increased complexity in codebase
  • potential performance implications.
  • Teams practicing trunk-based development or wishing to test features in production without affecting all users.
A/B Testing DeploymentTwo or more versions are released to randomly selected users to test different features, designs, or functionality.
  • Direct comparison of user behaviour
  • Data-driven decision making.
  • Requires sophisticated tracking and analysis tools
  • May result in inconsistent user experience.
  • When direct feedback on specific features or changes is needed to guide development decisions. ***
    %}
Manual Intervention: Requiring manual approval for every deployment, slowing down the release process.Failing to maintain a robust suite of automated tests: Since the code is deployed automatically, it is crucial to have a comprehensive set of automated tests to ensure the quality of the release.Lack of monitoring and alerts for production: even with the best test suite in place, issues can still arise in production, and without proper monitoring and alerting, these issues can go unnoticed.

Was this page helpful?

Previous
Deploying
© ZeroBlockers, 2024. All rights reserved.