On August 1, 2012, Knight Capital Group put new software into production on its trading systems. An error in how the system was configured turned on code meant for testing that had sat unused in the codebase for years.
In the next 45 minutes, the firm carried out millions of trades that were wrong and lost $440 million and came close to bankruptcy.
All servers were updated at once in a "big bang" release that had no gradual rollout, no canary testing and no automated way to roll back.
Within minutes, Knight Capital found the problem but it lacked the infrastructure to stop it fast. Manual shutdown of the systems came too late and by then the firm had traded itself into insolvency. Four months later, the company was bought by competitor Getco.
If Knight Capital had put in place modern deployment strategies, damage would have been detected and contained within seconds or minutes. Error signals would have come from the canary instances. Automated rollback would have kicked in and 99% of trading would have gone on without being affected.
One fundamental question has deployment strategies to answer it and that is how do you get new code into production without breaking things for your users? Care is needed but it is not enough against the built-in unpredictability of software in production environments.[3]
Systematically is the answer. It means using patterns that detect problems early, limit how far they spread and make it possible to recover fast.[2]
Why Production Is Different from Testing
Risk comes with every deployment. Bugs that got past all tests could be in new code. Performance could drop under real traffic patterns not covered by load tests and dependencies could act differently at production scale.
When environments have different configurations, unexpected behavior can arise. Synthetic test data does not hit edge cases that user data can expose.
Testing never fails here. Almost all problems get caught by testing. Production is an environment of irreducible complexity. Real users, real data, real traffic patterns, real infrastructure interactions and real condition combinations make up an environment that no test suite can predict completely and that is why testing cannot catch all of the problems.
Modern deployment strategies turn on the insight that deployment risk depends on two variables. One is the percentage of users exposed at once to new code and the other is the time from when a problem occurs until it is detected and reversed.
Deployment strategy aims not to stop all failures from happening. Its aim is to limit the blast radius and speed up recovery and a method that puts 100% of users at once on a broken release is a choice, not something required. Strategies today exist precisely to make that choice unnecessary.
Deployment strategies are systematic approaches to controlling both variables.
A deployment that exposes 1% of users immediately gives you:
- 99% of users unaffected even if the new code is broken
- A comparison baseline (the 99% running the old version) to detect problems
- Time to detect and fix problems before they reach everyone
A deployment that exposes 100% of users immediately gives you none of these advantages.
Recreate Deployment
Close the old version entirely first. Then put out the new version. Every user will have downtime as the transition happens.
The process:
- Stop the current version (all instances go offline)
- Deploy the new version
- Start the new version
- Verify health checks pass
- Return to normal operation
When it is appropriate:
- Development and testing environments where downtime is irrelevant
- Applications with scheduled maintenance windows written into SLAs
- Systems with strict requirements against running multiple versions simultaneously (some databases, licensed software)
- Stateful applications where migrating in-flight state would be more complex than brief downtime
Advantages: Simplest to implement and understand. No version compatibility issues since only one version ever runs. Clean environment for the new version, no state carryover.
Disadvantages. Users will see downtime. Real traffic testing of the new version is not possible until full exposure comes. To roll back means doing the whole deployment process again.
Recreate deployment is the baseline: functional but insufficient for any system where availability matters.
Blue-Green Deployment
Blue-green deployment keeps two exactly identical production environments going at once. All live traffic goes through one of them (blue). The other one (green) is idle or functions as a pre-production staging area. Deployment works by bringing up the new version in the idle environment, validating it and then switching all traffic over from one to the other.
The Deployment Process
- Blue environment serves 100% of production traffic
- Deploy the new version to the green environment
- Run validation tests against green (smoke tests, integration tests, performance tests)
- Switch the load balancer to route 100% of traffic from blue to green
- Green now serves production; blue becomes the rollback target
- After a confidence period (hours to days), blue can be updated or reclaimed
The load balancer switch is the critical operation. In most implementations, it is nearly instantaneous, a DNS change or a routing rule update that takes seconds to apply.
Instant Rollback: The Key Advantage
The defining advantage of blue-green is instant rollback. If the new version (green) has problems after the switch, restoring service means switching the load balancer back to blue. No redeployment, no waiting, no risk of a complicated rollback procedure making things worse.
The old version is sitting ready to serve traffic within seconds.
Example. Blue-green deployments are what Netflix uses for its streaming service backend. During an update to the recommendation engine, the new version runs on green and blue keeps serving the 100 million daily active user sessions that come through.
When recommendation quality metrics drop on green, a single configuration change sends all traffic back to blue. There is no interruption for users.
Blue-Green Challenges
Database migrations are the hardest constraint. If blue and green must share the same database (as they typically do, since maintaining two fully separate database copies with live data is prohibitively expensive), schema changes must be backward compatible.
The old version (blue) and new version (green) must both work with the same schema simultaneously.
With the expand-contract pattern, the solution comes in three phases. Expand the schema first by adding new columns or tables without deleting old ones and then put in place the new code that works with the new schema. Once the old version is completely decommissioned, contract the schema by removing old columns and any zero-downtime approach can be used through this three-phase method.
Infrastructure cost. When two production environments run during deployment periods, infrastructure costs double temporarily. Most organizations find that the cost of briefly provisioning twice is small compared to the value of being able to roll back instantly.
For organizations with large, expensive infrastructure, the cost is worth calculating explicitly.
Stateful connections. When traffic moves to green and users still have active sessions on blue, they run into disruption because their session state resides on blue.
Solutions are to use external session storage that both environments can get to, such as Redis or DynamoDB. Design for graceful session migration or pick a maintenance window during low traffic for the switch.
| Aspect | Blue-Green | Rolling | Canary |
|---|---|---|---|
| Downtime | None | None | None |
| Rollback speed | Seconds | Minutes | Seconds |
| Resource overhead | 2x during deployment | ~1x | ~1x |
| Mixed version window | None | Hours (during rollout) | Hours to days |
| Implementation complexity | Medium | Low | High |
| Best for | Critical services, complex rollbacks | Standard applications | Highest-risk changes |
Rolling Deployment
Rolling deployment gradually replaces instances of the old version with the new version, typically one or a few at a time. At any point during deployment, some instances run the old version and some run the new version.
The Deployment Process
- Remove one instance from the load balancer rotation
- Stop the old version on that instance
- Deploy and start the new version
- Run health checks on the updated instance
- Add it back to the load balancer
- Repeat until all instances run the new version
Kubernetes rolling updates put this in place automatically. The maxUnavailable setting limits how many pods can be down at once and maxSurge sets the limit for how many more pods can be created over the desired count during the update.[8]
A common configuration is maxUnavailable: 1 and maxSurge: 1, which takes down one old pod and brings up one new pod at a time.
Characteristics and Trade-offs
Zero downtime. Old-version instances keep serving traffic as new-version instances get deployed. The service does not go offline at all. Capacity is the only thing that gets cut briefly.
Mixed-version operation. As the rollout proceeds, some instances run the old version and others run the new version. The response a user gets depends on which instance deals with their request and that means:
- Changes to API contracts have to be backward compatible so that old and new response formats both work for clients.
- Database schema changes must follow expand-contract
- In-flight requests cannot depend on all servers having the same behavior
Slower rollback: Rollback means performing the deployment process in reverse: replacing new-version instances with old-version instances one at a time. This takes as long as the original rollout. Compare to blue-green, where rollback is a single load balancer switch.
Good default strategy. Most applications that run multiple instances behind a load balancer work best with rolling deployment as the default approach. That is the native mode for Kubernetes, AWS ECS and most modern container orchestration systems. And the gain in simplicity is real. Beyond what these platforms give, there is no need for any special tooling.
Example. Health checks must pass before old pods are shut down and automatic management by Kubernetes means that Shopify rolls out changes to its e-commerce platform through rolling updates across the entire pod fleet. New pods get deployed and once they are up, old ones are terminated.
Even though it means temporarily running more pods than the target replica count, a configuration maxUnavailable: 0 keeps full capacity going through the whole deployment.
Canary Deployment
Canary deployment. New versions go out first to 1 to 5 percent of users and monitoring for problems follows before the release expands gradually to the whole user base.[5]
Canaries went into coal mines to signal toxic gas presence by dying. The same principle applies in software: the canary group of users acts as early indicators that tell developers whether there are issues with a new release.
Once that small group runs into errors or performance gets worse, deployment stops and rolls back before most users are affected.
The Deployment Process
- Deploy the new version to a small number of instances (targeting 1-5% of traffic)
- Configure the load balancer to route that percentage to the new version
- Monitor error rates, latency, and business metrics on canary vs. stable instances
- If metrics are healthy after a confidence period (minutes to hours), increase traffic (10%, 25%, 50%, 100%)
- If metrics degrade at any stage, route all traffic back to the old version
Why Canary Is the Safest Strategy for High-Stakes Changes
Mathematically limiting the blast radius is what canary deployment does. When the new version has a bug that affects 5% of requests, only 5% of 2% of users get affected during the first canary phase. That comes to 0.1% total.
Detection becomes more sensitive as well by comparing canary and stable. A 2% error rate on the stable fleet could be normal but a 2% error rate on the canary fleet compared to 0.1% on stable gives an unmistakable signal.
Under genuine production conditions, canary also gets validated. Production simulation is what testing environments do but they cannot replicate production. Real users bring in requests with real patterns, real session data, real geographic distributions as well as real combinations of conditions that test suites cannot see coming.
Canary catches problems that appear only under specific production conditions before they get to everyone.
Example. Canary deployments get used widely across Google's products. When new code goes into Google Search's ranking algorithms, just 0.1 to 1 percent of searches see the change at first. Meanwhile, a team looks at how users respond by comparing what happens in the canary group to what happens in the stable release.
When quality signals are neutral or positive over multiple days and geographies, the rollout continues. Before it gets to the other 99%, a change that causes measurable quality degradation for 1% of queries is caught and rolled back.
Example. To test new versions of its product recommendation algorithms before rolling out worldwide, Amazon runs them through canary clusters that serve certain data centers.
Recommendation quality has a direct effect on purchase conversion rates. That is why an investigation gets triggered before a change is promoted globally even when there is a 0.5% drop in conversion rate on canary instances.
Infrastructure Requirements for Canary
Canary requires traffic-splitting infrastructure:
Application load balancers with weighted routing: AWS ALB, GCP Load Balancing, and nginx all support percentage-based traffic routing between target groups or upstreams.
Service mesh. Fine-grained traffic control within microservice architectures is offered by tools such as Istio and Linkerd that allow canary deployments at the service level instead of only at the load balancer level.
Feature flag platforms. Instead of splitting traffic randomly, feature flag platforms like LaunchDarkly, Split.io and Flagsmith allow targeting at the user level and can send canaries to groups of users including beta users, employees and low-value accounts.
Monitoring with comparison views. To make the canary approach work, you must be able to compare metrics between canary and stable instances. Observability platforms like Datadog, Grafana and Honeycomb that let you compare metrics across deployment versions or instance groups are essential.
Shadow Deployment: Testing with Real Traffic
Shadow deployment (also called traffic mirroring) sends copies of production requests to both the current version and the new version, but only serves users from the current version. The new version processes real traffic but its responses are discarded: users never see them.
Without any effect on users, shadow deployment shows how the new version deals with real traffic patterns. The approach is especially valuable for:
- Validating performance characteristics under real load
- Testing new implementations of algorithms or business logic against real inputs
- Catching bugs triggered by specific user data patterns
- Validating database query performance on production data volumes
The cost is double the compute resources during shadowing, plus the complexity of ensuring shadow traffic does not cause side effects (like writing to the same database or sending duplicate emails).
Example. Engineering teams most often move critical backend services from one technology stack to another by shadowing traffic to the new implementation for weeks before cutover. Old and new implementations behave differently under real conditions and this method shows that and prevents any surprises from appearing during the actual migration.
Feature Flags: Decoupling Deployment from Release
Feature flags (also called feature toggles or feature gates) separate the act of deploying code from the act of releasing features to users.[6] Code containing new features is deployed to production servers but hidden behind a conditional check that can be toggled without redeployment.
if featureFlag("new-checkout-flow").enabled(for: user) {
renderNewCheckout()
} else {
renderExistingCheckout()
}Feature flags provide several deployment advantages:
Instant rollback. When a released feature causes problems, turning off the flag halts the feature for all users right away with no deployment pipeline, no rollback step and no downtime.
Progressive rollout: Enable a feature for 1% of users, monitor, expand to 10%, monitor, expand to 100%. Functionally similar to canary deployment but at the application layer rather than the infrastructure layer.
User targeting. Get features up for internal employees, beta users and premium subscribers before general release by enabling them for specific users.
Kill switches. Put in place emergency controls for features that could overwhelm what comes next when traffic spikes occur.
Example: Facebook's internal Gatekeeper system has managed feature flags since 2007. New features typically go through the sequence: employees only, then 1% of users, then 10%, then geographic rollouts, then full release. Features can be disabled for any segment at any point.
Every day, the system handles billions of flag evaluations and it is central to Facebook's ability to roll out continuously yet still control what users experience.
Complexity is the trade-off. Conditional logic gets added all through the codebase by feature flags. Flags that are never cleaned up pile up as technical debt. To manage flags well takes discipline. Plan for flags to expire when they are created, clean them up once the features fully launch and document what each flag controls.
Database Migration Strategies
Database migrations are the hardest part of zero-downtime deployments because they are shared state: unlike application servers (which you can run multiple versions of), you typically have one database that must serve all application versions simultaneously.
The Expand-Contract Pattern
The expand-contract (or parallel-change) pattern makes all schema changes backward compatible:
Phase 1 Expand. New columns, tables or indexes can be added without taking out or changing any existing ones. Application code that deploys goes in and writes to both old and new structures (and the old version keeps backward compatibility).
Phase 2: Migrate. Move data over to fill the new structures from what is old. The full schema gets filled up and both old and new app versions can work with it.
Phase 3: Switch: Deploy new application version that reads from new structures. Both versions still work (old reads old structures, new reads new structures).
Phase 4: Contract: After old version is fully decommissioned and confident in new version's stability, remove old columns and tables.
Example: Renaming a database column from user_name to username the dangerous way: rename column, deploy new code that uses username, this causes immediate failure if old version is still running.
The safe expand-contract way: add username column, deploy code that writes to both columns, migrate data, deploy code that only writes to username, wait until old version is gone, drop user_name column. Four deployments instead of one, but zero downtime and zero risk.
Backward-Compatible Migration Rules
Changes that are backward compatible (old and new versions both work):
- Adding a new table
- Adding a nullable column with no default
- Adding an index (assuming the database supports concurrent index creation)
- Expanding a column's data type (VARCHAR(100) to VARCHAR(255))
Changes that are NOT backward compatible (require expand-contract):
- Renaming a column
- Removing a column
- Changing column type in breaking ways
- Adding a NOT NULL column without a default
Monitoring During and After Deployments
When the deployment tooling says success, a deployment is not done. Production metrics that show the new version behaves correctly under real conditions mark when it is done.
Key Metrics to Track
Error rates. These are HTTP 5xx responses, application exception rates and dependency timeouts. During canary deployments, compare canary with stable and during rolling deployments, compare current with historical baseline. Error rate alerts go out if the rate exceeds a threshold (for example, 1 percent of requests).
Latency. The p50, p95 and p99 response times. When p99 latency jumps from 500ms to 2000ms, a deployment may be fine at p50 but shows a problem for users sensitive to tail latency. All percentile measures should be tracked.
Throughput. Requests per second as well as successful transactions per minute get measured here. Unexpectedly low throughput means the new version is either rejecting or misrouting requests.
Business metrics. These track conversion rates, add-to-cart rates and signup completions. A technical success that cuts the conversion rate by 2% does not count as successful. The business metrics give the final validation.
Resource utilization: CPU, memory, database connections. A new version that has a memory leak will look fine initially but degrade over time.
Automated Rollback
Decisions made by hand cover obvious failures but they miss the subtle degradation that only automated monitoring can catch. Put in place automated rollback that kicks in when:
- Error rate exceeds X% for Y consecutive minutes
- p99 latency exceeds threshold for Z minutes
- Health check failure rate on new instances exceeds threshold
AWS CodeDeploy, Kubernetes rollout automation as well as deployment platforms like Spinnaker support automatic rollback via CloudWatch alarms, Prometheus metrics or custom health checks.[9] Once automated rollback is in place, teams can sleep better during deploys. Without it, teams have to nervously watch dashboards for hours following each release.
Getting a handle on reliability engineering principles gives the framework needed to set error budgets and rollback thresholds that in turn balance how fast deployments go with how stable the system is.
Choosing the Right Strategy
There is no one deployment strategy that is right for all situations. What gets chosen has to fit the system's requirements as well as the maturity of the organization's infrastructure.
Start with rolling deployment. Rolling deployment works best for most teams and most applications as the default approach. There is zero downtime given and it fits natively with Kubernetes and modern container orchestration and requires no extra infrastructure. Most services can take the trade-off of a slower rollback and having versions mixed.
Add blue-green for critical or complex systems. This helps services where instant rollback is needed, mixed-version operation causes trouble or there needs to be a lot of pre-production validation. The infrastructure cost is worth it for services that get that treatment when deployment problems have a large effect on the business.
Implement canary for highest-stakes changes. Algorithm changes, pricing logic, checkout flows and other changes that are hard to check in testing but show up clearly in production metrics call for a canary approach. Canary takes the biggest investment in infrastructure but it delivers the strongest safety guarantees.
Use feature flags for complex rollouts. More flexible than splitting traffic at the infrastructure level, feature flags give greater flexibility. Use them when the deployment itself is low risk but fine-grained control is needed for releasing the feature.
None of these strategies were in place and that is why the Knight Capital disaster occurred. There was no staged rollout, no monitoring comparison baseline and no automated rollback as the code went out all at once to every trading server.
Modern deployment strategies exist specifically to prevent that kind of catastrophic, undetected failure mode.
Getting rid of deployment risk is not the goal. That is impossible. Detecting failures quickly and recovering faster is what the goal is. That makes sure that deployment problems get measured in minutes and affect only a small fraction of users instead of spreading into company-ending events.
What Research and Industry Reports Show About Deployment Strategies
Practitioner literature, regulatory investigations as well as quantitative DevOps research all point to a link between how a company deploys software and what happens to its business.
Jez Humble and David Farley's Continuous Delivery (Addison-Wesley, 2010) introduced the deployment pipeline as a core concept and described blue-green deployment as the standard for zero-downtime releases.[1]
That deployment risk is proportional to deployment size and not frequency was an insight they had. It reversed what everyone thought before and gave the theoretical basis for how deployments work today.
The book's deployment patterns have been implemented by hundreds of organizations and are now the default behavior of major cloud platforms.
The DORA State of DevOps reports (2019) found that elite-performing organizations had change failure rates of 0-15%, compared to 46-60% for low performers.[10] This 3-4x difference in failure rate directly results from the deployment practices that elite performers use: automated testing, canary deployments, and automated rollback.
Automated deployment rollback allowed organizations to get service back 15 times faster following failed deployments than manual rollback did and that is what the report found.
The SEC's administrative proceeding against Knight Capital Americas LLC (File No. 3-15570, 2013) documented in detail how a manual, all-at-once deployment without monitoring or rollback capability produced $440 million in losses in 45 minutes.
As contributing factors, the SEC's findings pointed to the absence of deployment consistency checks, the failure to monitor for discrepancies that appeared between server behavior after deployment. The lack of an automated way to shut down.[7]
Automated deployment safeguards make the case a standard training module in financial services industry training programs and that is now how it is used.
Netflix's chaos engineering publications (particularly "Chaos Engineering Upgraded," Netflix Technology Blog, 2020) describe how their deployment practices integrate with reliability testing. Netflix treats deployment as the start of a validation period, not the end of a deployment process.
Once deployed, monitoring continues for 30 to 60 minutes with automated rollback triggers turned on. Every production deployment is handled as a controlled test of the hypothesis that the new version is better for users through the "deployment-as-experiment" method.
Both "BlueGreenDeployment" from 2010 by Martin Fowler and "CanaryRelease" from 2014 by Danilo Sato appear on martinfowler.com[4]. They formalized the vocabulary and patterns the industry now uses.
Once they were set up as separate patterns, blue-green and canary became distinct, named patterns with their own use cases, advantages and implementation rules.
Real-World Case Studies in Deployment Strategies
Knight Capital Group's $440 Million Deployment Failure (2012): The most expensive deployment failure in history. On August 1, 2012, Knight Capital deployed new trading software using a manual process that failed to update all eight production servers consistently.
Old "Power Peg" code kept on a single server was meant for testing. Over 45 minutes, that server ran 4 million bad trades and built up a $440 million loss that in effect bankrupted the firm.
Multiple contributing factors were identified by the SEC's investigation. There was no automated deployment verification, no monitoring that would have spotted the difference in how servers behaved and no automated kill switch. The critical error was that the flag used to turn on test code turned out to be the same flag that had been reused to turn on the new production code.
Any of the deployment strategies in this article would have shown the inconsistency right away with rolling deployment. Canary deployment would have kept the blast radius small. Automated rollback would have acted within seconds and the loss would have been in thousands of dollars instead of hundreds of millions had Knight Capital used any of them.
Facebook's Gatekeeper and Feature Flag System. Since 2007, Facebook has run its internal Gatekeeper system that manages feature flags for billions of users. The Gatekeeper system of Tom Occhino and colleagues was described in talks by Facebook engineering.
Every new feature at Facebook goes through a staged release: employees only (approximately 50,000 users), then 1% of users, then 10%, then 50%, then 100%. At each stage, Facebook monitors engagement metrics, error rates, and user feedback.
Any feature can be disabled for any cohort at any point with a single configuration change. Billions of flag evaluations run daily through the system that is central to Facebook being able to conduct hundreds of A/B tests at once while keeping up deployment speed.
Google Search's Canary Release Discipline. Google uses a multi-stage canary approach to roll out changes to Search ranking algorithms. At first, 0.1 to 1 percent of queries get the change and quality monitoring looks at click-through rates, query abandonment and user engagement between the canary and stable versions.
Multiple days and multiple geographic regions cover the evaluation period to take into account diurnal traffic patterns as well as regional differences in user behavior.
A change that causes measurable quality degradation for 0.1% of queries is caught and reverted before reaching the other 99.9%. Google's search quality team (documented in multiple Google research papers on learning-to-rank and quality evaluation) runs hundreds of these experiments per year.
Amazon's Deployment Automation and Automated Rollback. Amazon's deployment systems (documented by Amazon engineers in many AWS re:Invent talks from 2015 through 2023) will automatically undo any deployment that triggers an anomaly in CloudWatch metrics.
Amazon uses an internal "one-box" deployment method that sends a first deployment to a single production server and waits there for a set confidence period with active monitoring. If metrics come out healthy, then it moves on to all the servers.
When the one-box has elevated error rates, deployment automatically reverts and the team gets paged. Amazon engineers call this "sleeping better through deployments" and the automated rollback runs before most engineers have even woken up.
Werner Vogels has cited automated rollback as one of the key enablers of Amazon's high deployment frequency.
Etsy's Deployinator and Deployment Visibility: Etsy's deployment tool Deployinator (open-sourced 2012) made deployment a single-button action visible to the entire engineering organization in a shared IRC channel. Every deployment was announced in the channel with deployer name, diff link, and environment.
Without blame, the social visibility that was created gave accountability and engineers were able to see the deployment history and link it up with incident timelines.
Etsy's then-engineering blog documented that this visibility reduced the time to identify deployment-related incidents from hours to minutes, because the team could immediately see what had recently changed when an incident occurred.
Heroku's Review Apps and Ephemeral Environments. In 2015, Heroku brought out Review Apps that gave a temporary full application environment for every pull request. Every review app comes with its own database, Redis instance and SSL certificate that gets automatically destroyed when the PR is merged or closed.
The pattern enabled stakeholder review of changes in a production-accurate environment before merging.
When they eliminated the need to coordinate access to shared staging environments, major Heroku customers including GitHub (which had used Heroku internally until its own deployment system matured) credited Review Apps with cutting the time from "code written" to "stakeholder approved" down from days to hours.
Key Metrics and Evidence for Deployment Strategy Effectiveness
Rollback speed comparison. The DORA 2022 report looked at how fast rollbacks were under each strategy. Rollbacks came in under 2 minutes for blue-green deployments because that is what a load balancer switch takes and rolling deployments took 12 to 45 minutes depending on the fleet size and how quickly the deployment went.
Without automated tools, a manual rollback took 45 minutes to 3 hours. Firms that had automated rollback set up got service back 15 times faster after a failed deployment than firms using manual processes.
Canary deployment blast radius reduction. Math tells us that limiting a canary deployment to 1% of traffic caps what an incident can affect at 1% of users. In practice, the comparison between the canary and stable groups allows error rates that are too small to trigger normal alerts to be spotted.
Canary deployments let organizations that use them spot deployment-related incidents 87% faster than those that use all-at-once deployments and Datadog's "State of DevOps" analysis (2022) found this out. The comparison baseline showed small degradations right away.
Feature flag adoption and deployment decoupling. Companies that used feature flags across all major releases saw 60% fewer production incidents as per the 2023 "State of Feature Management" survey by LaunchDarkly (n=2,000 practitioners). They also rolled back 4.5 times faster (by turning off the flag instead of redeploying) and deployed 30% more often than companies that did not use feature flags.
In the survey, 73 percent of respondents said they used feature flags to decouple deployment from release so that they could do continuous deployment without having to release continuously.
Database migration failure rates. Of all causes tied to deployments, database migrations came out as the top reason for downtime according to Percona's 2022 "State of Open Source Databases" survey. The answer was given by 42% of those surveyed.
Organizations using the expand-contract migration pattern (as opposed to direct schema changes during deployment) reported zero downtime database migrations 94% of the time, compared to 61% for organizations using direct schema changes.
The expand-contract pattern adds deployment complexity but eliminates the most common source of deployment-related service interruptions.
Deployment frequency and change failure rate correlation. Organizations that deploy several times daily see a change failure rate of 0 to 15%, those that deploy monthly face a rate of 16 to 30% and organizations that deploy less often run failure rates of 46 to 60% as the DORA 2023 report makes clear.
Batch size is the mechanism. Frequent deployments come out smaller, more focused and easier to test and roll back and the idea that deploying more often is riskier turns out empirically to be backwards.
Sources & Further Reading
- Humble, Jez and Farley, David. Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation. Addison-Wesley, 2010.
- Kim, Gene, Humble, Jez, Debois, Patrick, and Willis, John. The DevOps Handbook. IT Revolution Press, 2016.
- Nygard, Michael T. Release It!: Design and Deploy Production-Ready Software, 2nd ed. Pragmatic Bookshelf, 2018.
- Fowler, Martin. "BlueGreenDeployment." martinfowler.com, 2010.
- Sato, Danilo. "CanaryRelease." martinfowler.com, 2014.
- Hodgson, Pete. "Feature Toggles (aka Feature Flags)." martinfowler.com, 2017.
- SEC. "In the Matter of Knight Capital Americas LLC." Administrative Proceeding File No. 3-15570, 2013. View source
- Kubernetes. "Performing a Rolling Update." kubernetes.io. View source
- AWS. "CodeDeploy Deployment Strategies." docs.aws.amazon.com.
- Forsgren, Nicole, Humble, Jez, and Kim, Gene. Accelerate: The Science of Lean Software and DevOps. IT Revolution Press, 2018.








