Deployment Strategies

rocket_launch

Deployment Patterns

Blue-Green Deployment

Two identical production environments (blue and green). Deploy new version to inactive environment. Test thoroughly before switching. Instant cutover via load balancer or DNS. Quick rollback by switching back. Zero downtime deployment. Full environment duplication cost. Stateful applications require data synchronization. Database migrations challenging. AWS Elastic Beanstalk, Cloud Foundry support.

Similar Technologies
Canary DeploymentRolling DeploymentRecreateShadow DeploymentA/B Testing
Canary Deployment

Gradual rollout to subset of users. Start with 5-10% traffic to new version. Monitor metrics and errors. Increase traffic progressively (10% → 25% → 50% → 100%). Automated or manual promotion. Early detection of issues with limited blast radius. Requires traffic routing capability. Feature flags for fine-grained control. Kubernetes, service mesh, API gateway support. Similar to phased rollout.

Similar Technologies
Blue-GreenRollingProgressive DeliveryA/B TestingShadow Deployment
Rolling Deployment

Gradual replacement of instances with new version. Update subset at a time maintaining availability. Stop-the-world for batch, then proceed to next. Configurable batch size and interval. Slower than blue-green but no duplicate environment. Kubernetes rolling update. Mixed versions running temporarily. Requires backward compatibility. Automatic rollback on failures. AWS ECS rolling update.

Similar Technologies
Blue-GreenCanaryRecreateImmutable DeploymentIn-place Update
Recreate Deployment

Stop all instances then deploy new version. Simplest strategy with downtime. Suitable for non-critical applications. Complete shutdown before startup. No resource duplication needed. No compatibility concerns between versions. Fast when downtime acceptable. Maintenance windows for planned downtime. Development and staging environments. Legacy applications without HA requirements.

Similar Technologies
Zero-downtime DeploymentsRollingBlue-GreenIn-place UpdateScheduled Maintenance
Shadow Deployment (Dark Launch)

Deploy new version alongside production receiving copy of traffic. New version processes requests without affecting users. Compare results between versions. Performance and behavior testing with real traffic. Risk-free validation before full deployment. Requires traffic mirroring/duplication. Resource overhead for parallel processing. Detect bugs and performance issues. Service mesh (Istio) traffic mirroring. Also called dark launching.

Similar Technologies
CanaryBlue-GreenA/B TestingFeature FlagsSynthetic Testing
A/B Testing Deployment

Deploy multiple versions for experimentation. Route users based on criteria (location, device, user segment). Measure business metrics and user behavior. Statistical analysis determines winner. Feature flags for user targeting. Multi-armed bandit algorithms. Gradual shift to winning variant. Marketing and product experimentation. LaunchDarkly, Optimizely. Different from canary (business metrics vs technical metrics).

Similar Technologies
CanaryFeature FlagsMultivariate TestingProgressive DeliveryTraffic Splitting
sync

CI/CD Practices

CI/CD Pipeline Design

Automated path from code commit to production. Source control triggers. Build, test, security scan, artifact creation, deployment stages. Pipeline as code (Jenkinsfile, GitHub Actions YAML). Parallel stages for speed. Manual approval gates for production. Environment-specific configurations. Rollback capabilities. GitLab CI, Jenkins, GitHub Actions, Azure DevOps, CircleCI. Fail fast principle. Visualize pipeline status.

Similar Technologies
Manual DeploymentScriptsAd-hoc AutomationSimple CICustom Tooling
Testing Stages

Progressive testing confidence levels. Unit tests (fast, isolated). Integration tests (service interactions). Contract tests (API compatibility). Performance tests (load, stress). Security tests (SAST, DAST, dependency scanning). End-to-end tests (user journeys). Smoke tests post-deployment. Test pyramid: many unit, fewer integration, few E2E. Shift-left testing. Quality gates block bad code. Parallel test execution.

Similar Technologies
Manual TestingMinimal TestingProduction TestingTest After DeployNo Automation
Artifact Management

Storing and versioning build outputs. Container images in registries (Docker Hub, ECR, ACR, GCR). Package repositories (npm, Maven, PyPI, NuGet). Binary artifacts (JARs, WARs, ZIPs). Immutable artifacts with semantic versioning. Tag with git commit SHA, build number. Artifact promotion between environments. Retention policies for storage management. Security scanning of artifacts. JFrog Artifactory, Nexus Repository.

Similar Technologies
Build per EnvironmentNo VersioningFile StorageGit LFSManual Storage
Deployment Automation

Zero-touch deployment process. Infrastructure as Code provisioning. Configuration management. Database migrations. Service startup and health checks. Traffic routing updates. Monitoring and alerting setup. Rollback triggers. Ansible, Terraform, CloudFormation for automation. GitOps with ArgoCD, Flux. Reduce human error and increase velocity. Consistent deployments across environments. Deployment frequency as DORA metric.

Similar Technologies
Manual DeploymentPartial AutomationScriptsRunbooksClickOps
Continuous Deployment vs Delivery

Continuous Delivery: automated pipeline to production-ready state, manual release decision. Continuous Deployment: every change automatically deployed to production. CD enables business to choose release timing. CD requires high confidence in automated testing. Gradual progression from CI → Continuous Delivery → Continuous Deployment. Feature flags separate deployment from release. Deployment frequency and lead time for changes (DORA metrics).

Similar Technologies
Continuous Integration OnlyScheduled ReleasesManual DeploymentRelease TrainsWaterfall Deployment
Build Once, Deploy Anywhere

Single artifact deployed across all environments. Environment-specific configuration external to artifact. Prevents environment drift and surprises. Container images ideal for this pattern. Configuration via environment variables, config files, secret managers. Immutable infrastructure principle. Same artifact tested in dev runs in prod. Reduces build time. Twelve-factor app methodology. Separates code from config.

Similar Technologies
Build per EnvironmentEnvironment-specific BuildsIn-place UpdatesCustom BuildsConditional Compilation
new_releases

Release Management

Feature Flags (Feature Toggles)

Runtime control of feature availability. Decouple deployment from release. Gradual feature rollout and A/B testing. Kill switch for problematic features. Canary releases at feature level. Permanent flags (ops toggles) vs temporary (release toggles). Flag management platforms (LaunchDarkly, Split.io, Unleash). Technical debt from stale flags. Testing complexity with flag combinations. Experimentation and trunk-based development enabler.

Similar Technologies
Branch-based ReleasesDeployment = ReleaseManual ConfigurationCode CommentsSeparate Deployments
Release Trains

Scheduled, regular release cadence. Weekly, bi-weekly, or monthly releases. Features ready board the train, others wait. Predictable release schedule. Reduces release pressure and risk. Aligns with business planning. Combined with feature flags for flexibility. Spotify model with weekly releases. SAFe Agile Release Train. Trade-off between predictability and speed. Suitable for large organizations.

Similar Technologies
Continuous DeploymentAd-hoc ReleasesOn-demand ReleasesQuarterly ReleasesFeature-based Release
Rollback Strategies

Quick recovery from bad deployments. Blue-green: instant switch to previous environment. Rolling: redeploy previous version incrementally. Database rollback more complex (migrations, data changes). Feature flags to disable features. Forward-fix vs rollback decision. Automated rollback on error thresholds. Maintain previous artifacts for rollback. Test rollback procedures regularly. Immutable infrastructure simplifies rollback.

Similar Technologies
Forward Fix OnlyManual RecoveryBackup RestoreNo Rollback PlanStart from Scratch
Release Notes & Changelog

Communicate changes to stakeholders. User-facing changes and bug fixes. Breaking changes and migration guides. Performance improvements and deprecations. Semantic versioning implications. Automated generation from commits (conventional commits). Multiple audiences (users, developers, operators). API changelog for integration partners. Keep-a-changelog format. Link to documentation and issues. Transparency builds trust.

Similar Technologies
No DocumentationCommit Messages OnlyInternal NotesAd-hoc CommunicationVerbal Updates
Hotfix Process

Expedited process for critical production issues. Branch from production, not develop. Minimal changes to fix specific issue. Fast-tracked testing and approval. Deploy via standard pipeline when possible. Document for post-mortem. Merge back to develop and main. Balance speed with safety. Avoid technical debt from rushed fixes. Security patches often hotfixes. Clear criteria for hotfix vs regular release.

Similar Technologies
Wait for Next ReleaseManual PatchEmergency DeployNo Special ProcessForward to Next Sprint
Deployment Windows & Freeze

Scheduled times for deployments. Change freeze during critical periods (holidays, major events). Deployment windows during business hours or off-hours. Balance stability with velocity. Freeze can create pileup of changes. Exception process for critical fixes. Reduced freeze with better practices (feature flags, automated testing). Document and communicate schedules. Cultural shift toward continuous deployment reduces need.

Similar Technologies
Deploy AnytimeNo Restrictions24/7 DeploymentContinuous DeploymentManual Approval
layers

Environment Management

Environment Strategy

Dev, Test/QA, Staging/Pre-prod, Production environments. Development for active coding. Test for QA team validation. Staging mirrors production for final validation. Production serves users. Additional: sandbox, demo, performance testing. Short-lived environments for features. Production-like staging essential. Environment parity reduces surprises. Cost vs fidelity tradeoff. Infrastructure as code for consistency.

Similar Technologies
Dev and Prod OnlyShared EnvironmentsLocal Development OnlyMany EnvironmentsDynamic Environments
Environment Parity

Minimize differences between environments. Same OS, runtime versions, dependencies. Similar resource sizing (scaled-down OK). Same deployment process. Reduces 'works on my machine' issues. Infrastructure as code ensures consistency. Containers for portable environments. Configuration differences via environment variables. Regular validation of parity. Twelve-factor app principle. Prod-like data in staging (anonymized).

Similar Technologies
Different EnvironmentsProd is SpecialManual ConfigurationBest Effort SimilarityDev Doesn't Match Prod
Configuration Management

Environment-specific settings external to code. Environment variables (12-factor). Configuration files per environment. Hierarchical config (defaults overridden by env-specific). Secret management (AWS Secrets Manager, Vault). Avoid hardcoded values. Version control for non-sensitive config. Type safety and validation. Spring Cloud Config, Consul. Separate config from code. Runtime configurability without redeployment.

Similar Technologies
Hardcoded ValuesEnvironment-specific BuildsDatabase ConfigurationCode Changes for ConfigProperties Files in Code
Ephemeral Environments

Short-lived environments for specific purposes. Pull request preview environments. Feature branch deployments. Spin up on demand, tear down when done. Cost optimization by avoiding idle resources. Parallel testing and development. Heroku review apps, Netlify deploy previews, Vercel. Kubernetes namespaces for isolation. Infrastructure as code enables automation. Faster feedback on changes. Enable independent work.

Similar Technologies
Shared EnvironmentsLong-lived EnvironmentsLocal OnlyManual EnvironmentsProd and Dev Only
Production vs Non-Production

Clear separation and controls. Stricter access controls for production. Change approval processes. Enhanced monitoring and alerting. Backup and disaster recovery for prod. Non-prod uses synthetic or anonymized data. Cost optimization in non-prod (smaller instances, auto-shutdown). Network isolation. Tag resources by environment. Different SLAs. Prod-like staging for final validation but not business-critical.

Similar Technologies
All Environments EqualMinimal DistinctionNo SeparationProd is Special SnowflakeDifferent Architectures
Environment Provisioning

Automated creation of environments. Infrastructure as Code (Terraform, CloudFormation). Template-based with parameters. Self-service portals for developers. Standardized environments reduce drift. Environment as a service. Cloud provider automation (CloudFormation, ARM templates). Ansible for configuration. Fast environment creation enables experimentation. Cost tracking per environment. Teardown automation for cleanup.

Similar Technologies
Manual ProvisioningClickOpsTicket-based RequestsPre-existing EnvironmentsSnowflake Environments
code

Infrastructure as Code

Terraform

Declarative infrastructure as code by HashiCorp. HCL language, provider model (AWS, Azure, GCP, 1000+ providers). State management (local, remote in S3/Terraform Cloud). Modules for reusability. Plan before apply for safety. Immutable infrastructure approach. Terraform workspaces for environments. Import existing infrastructure. Community modules. Open source with commercial Terraform Cloud offering. Most popular multi-cloud IaC tool.

Similar Technologies
CloudFormationPulumiARM TemplatesAnsibleCDK
CloudFormation & ARM Templates

Native IaC for AWS (CloudFormation) and Azure (ARM/Bicep). JSON or YAML templates. Stack-based deployment. Change sets preview changes. Drift detection. Nested stacks for modularity. Template designer tools. Strong integration with cloud provider. No state file management needed. Free service. Troposphere/CDK for programmatic generation. Bicep improves ARM readability.

Similar Technologies
TerraformPulumiAWS CDKAnsibleManual Console
Pulumi

Infrastructure as code using general-purpose languages. TypeScript, Python, Go, C#, Java. Leverage IDE features (autocomplete, type checking). Reuse language ecosystem (npm packages, etc.). Pulumi state management like Terraform. Multi-cloud support. Component model for reusable infrastructure. Mix imperative and declarative. Pulumi Cloud for state and CI/CD. Appeals to developers more than ops-specific DSLs.

Similar Technologies
TerraformCloudFormationCDKAnsibleCustom Scripts
AWS CDK & Azure Bicep

Cloud-native IaC using programming languages. AWS CDK supports TypeScript, Python, Java, C#, Go. Synthesizes CloudFormation templates. Higher-level constructs than CloudFormation. Azure Bicep: DSL compiling to ARM templates. Type safety and IDE support. Testable infrastructure code. Steep learning curve but powerful. Growing ecosystems. Native integration with cloud provider services.

Similar Technologies
TerraformNative CloudFormation/ARMPulumiTroposphereScripts
GitOps

Git as single source of truth for infrastructure and apps. Declarative config stored in Git. Automated sync from Git to cluster. Pull-based deployment model. ArgoCD, Flux for Kubernetes. Audit trail via Git history. Pull requests for changes with reviews. Rollback via Git revert. Continuous reconciliation to desired state. Separate deployment from CI pipeline. Reduces cluster access needs. Immutable, versioned infrastructure.

Similar Technologies
Push-based CDCI/CD Pipeline DeploysManual DeploymentAnsibleImperative Scripts
Drift Detection & Remediation

Identify and correct infrastructure changes outside IaC. Manual console changes create drift. Terraform plan shows drift. CloudFormation drift detection. Policy enforcement (AWS Config, Azure Policy). Automated remediation or alerting. Prevent console access to reduce drift. Immutable infrastructure minimizes drift impact. Regular drift checks in pipeline. Import drift into IaC. Cultural: all changes via IaC. Config drift causes unpredictable behavior.

Similar Technologies
Accept DriftManual ReconciliationIgnore ChangesNo DetectionPeriodic Rebuild