Best Practices For DevOps Advanced Deployment Patterns
Best Practices For DevOps Advanced Deployment Patterns
Best Practices For DevOps Advanced Deployment Patterns
for DevOps:
Advanced Deployment Patterns
- xebialabs.com -
WHITE PAPER
Executive Summary
Getting new software to your users without interrupting their experience is hard; how
do you upgrade an application that’s in active use? And if you do take an application
offline for an update, what happens if something goes wrong?
It’s tempting to try to minimize downtime and reduce release risks by implementing
extensive manual processes and procedures—but pre-release work that isn’t
automated slows down delivery and makes it hard to roll out new features.
The good news is that you can avoid time-consuming manual work while reducing
release risks by following DevOps principles to automate the release and deployment
process. And as you automate, using advanced deployment patterns can help you
speed up the software delivery cycle while maintaining control over the way your
applications are deployed.
This white paper gives you insights into the DevOps best practice of advanced
deployment patterns: Blue/Green deployments, rolling updates, canary releases,
dark launches, and feature toggles. It describes how each pattern works, the
advantages and disadvantages of each one, considerations for implementing them,
and best practices when applying them.
But simply automating manual activities isn’t always enough; organizations need to
ensure that DevOps teams implement automated processes in a consistent way, so
that those processes can be scaled across the enterprise. Advanced deployment
patterns provide a flexible structure that you can use when automating the release of
new software.
With deployment patterns, you can control the technical deployment of new software
versions as well as the rollout of new features to users. You can even release
features to limited user groups and test them in Production with much less risk than if
you made them generally available.
1
WHITE PAPER
§ Minimize application downtime and work toward the goal of zero downtime
Blue/Green Deployments
In the Blue/Green deployment pattern, a load balancer directs traffic to the active
(Blue) environment while you upgrade the standby (Green) environment. After smoke
testing the application in the Green environment and establishing that it is operating
correctly, you adjust the load balancer to direct traffic from the Blue environment to
the Green environment.
2
WHITE PAPER
Rolling Updates
In a rolling update, each server node in the environment is taken offline and
upgraded, one by one. After a node is upgraded, manual or automatic smoke testing
determines whether the application is functioning as expected. If the application is up
and running properly, its server node is made available for user traffic, and the next
node is taken offline to be upgraded.
3
WHITE PAPER
the application architecture must support running in cluster mode because multiple
instances of the application will access the database during the update.
Finally, taking servers offline means that there is less capacity for user traffic during
the update.
Canary Releases
In a canary release, you upgrade an application on a subset of the infrastructure and
allow a limited set of users to access the new version. This approach allows you to
test the new software under a Production-like load, evaluate how well it meets users’
needs, and assess whether new features are profitable.
4
WHITE PAPER
For example, you could implement the back end of a product recommendation
feature on an ecommerce website and test its performance without showing the
recommendations to site visitors. When you’re satisfied with the feature’s
performance, you can deploy the front-end recommendation interface on the website.
5
WHITE PAPER
6
WHITE PAPER
2. Running multiple application versions at the same time means that the
database must be compatible with all active versions. You must
decouple database updates from application updates. In addition,
Development teams must design database changes to be backward
compatible. In practice, maintaining compatibility has consequences for
both database changes and application logic.
1. Limit the number of application versions that are live at the same time
to two. This approach reduces the complexity of deployments,
infrastructure management, and database compatibility.
7
WHITE PAPER
Deploying small increments also reduces lead time, which is the time that
elapses between the start of feature development until that feature is
available to end users. Reduced lead time is one of the key goals of
Continuous Delivery, as it enables you to deliver value to users and to the
market faster.
The fastest way to get started with advanced deployment patterns is to adopt an
Application Release Orchestration solution that supports them out of the box, so you
don’t have to write scripts or build workflows to create the pattern you want. The right
ARO solution ensures patterns are executed consistently while still supporting
flexibility. An ARO solution that comes with pre-defined deployment pattern
8
WHITE PAPER
templates allows DevOps teams to try out different patterns and see what works best
for their applications and infrastructure.
The XebiaLabs DevOps Platform is an ARO solution that supports automation and
orchestration for your entire software delivery pipeline. With XebiaLabs, you can
create scalable release and deployment processes that DevOps teams can reuse
across applications and environments—all without writing scripts or building
workflows by hand.
The XebiaLabs DevOps Platform includes fully integrated, out-of-the-box support for
Blue/Green deployments, rolling updates, canary releases, dark launches, and
feature toggles. It lets you take control of release and deployment processes and at
the same time, gives your teams additional flexibility to best meet their applications’
unique needs.
9
WHITE PAPER
About XebiaLabs
XebiaLabs develops enterprise-scale Continuous Delivery and DevOps software,
providing companies with the visibility, automation and control to deliver software
faster and with less risk. Global market leaders rely on XebiaLabs to meet the
increasing demand for accelerated and more reliable software releases.
10