Deploy != Release (Part 1)
The difference between deploy and release and why it matters.
Q: âIs the latest version deployed?â
A: âI deployed animated gif support to production.â
Q: âSo animated gif support is released?â
A: âThe animated gif release is deployed.â
Q: ââ¦â
Iâve worked at many companies where âdeployâ, âdeploymentâ, âshipâ, and âreleaseâ are used loosely, even interchangeably. As an industry, we havenât done a great job of standardizing our use of these terms, even though weâve radically improved operations practices and tooling over the past decade. At Turbine Labs, we use precise definitions of âshipâ, âdeployâ, âreleaseâ, and ârollbackâ, and spend a lot of our time thinking about what the world looks like when you think about âreleaseâ as an independent phase of your shipping process. In part one of this post, Iâll share these definitions, describe some common âdeploy == releaseâ practices, and explain why they have a poor risk profile. In part two, Iâll describe some of the extremely powerful risk mitigation techniques made possible when âdeployâ and âreleaseâ are treated as distinct phases of your software shipping cycle.
Ship
Shipping is your teamâs process of getting a snapshot of your serviceâs code â a version â from your teamâs source control repository all the way to handling production traffic. I think of the overall shipping process as four distinct groups of smaller, specialized processes: Build, test, deploy, and release. Thanks to technology advances in cloud infrastructure, containers, orchestration frameworks, as well as process advances like twelve-factor, continuous integration, and continuous delivery, itâs never been easier to execute the first three processes â build, test, and deploy.
Deploy
Deployment is your teamâs process for installing the new version of your serviceâs code on production infrastructure. When we say a new version of software is deployed, we mean it is running somewhere in your production infrastructure. That could be a newly spun-up EC2 instance on AWS, or a Docker container running in a pod in your data centerâs Kubernetes cluster. Your software has started successfully, passed health checks, and is ready (you hope!) to handle production traffic, but may not actually be receiving any. This is an important point, so Iâll repeat it using Mediumâs awesome large pull quote format:
Deployment need not expose customers to a new version of your service.
Given this definition, deployment can be an almost zero-risk activity. Sure, a lot can go wrong during deployment, but if a container backs off a crash loop in the woods and no customer gets a 500 status response, did it really happen?
Release
When we say a version of a service is released, we mean that it is responsible for serving production traffic. In verb form, releasing is the process of moving production traffic to the new version. Given this definition, all the risks we associate with shipping a new binary â outages, angry customers, snarky write-ups in The Register â are related to the release, not deployment, of new software. (At some companies Iâve heard this phase of shipping referred as rollout. Weâll stick to release for this post.)
Rollback
Sooner or later, but probably sooner and later, your team is going to ship something broken. Rollback (and its dangerous, unpredictable, stressed-out cousin, roll-forward) is the process of getting production back to a known state, typically by re-releasing the most recent version. Itâs useful to think of rollback as just another deploy and release, the only differences being:
- You are shipping a version whose characteristics are known in production,
- You are executing your deploy and release process under time pressure, and
- You are potentially releasing into a different environment â things may have changed during (or been changed by) the failed release.
Now that weâve agreed on these definitions for shipping, deployment, release, and rollback, letâs examine some common deploy and release practices.
Release in Place (Or deploy == release)
When your teamâs shipping process involves pushing a new version of your software onto a server running the old version and re-starting the process, youâre releasing in place. Using our definition above, deployment and release occur simultaneously: as soon as the new software is running (deployed), itâs taking all the production traffic the old version was taking a split-second ago (released). In this world, a successful deploy is a successful release, and a bad deploy gets you a partial or complete outage, a bunch of mad users, andâpossiblyâa hyperventilating manager.
Release-in-place has the distinction of being the only deploy/release process weâll discuss here that directly exposes deploy risk to customers. If the new version youâve just deployed canât launch â maybe it throws an error when it doesnât find a newly-required secret in an environment variable, maybe thereâs an unmet library dependency, or maybe itâs just not your day â there is no old version to take that instanceâs customer traffic. Your service isâat least partiallyâdown.
Moreover, if thereâs a user-facing issue or more subtle operational issue with the new version â I call this release risk â release-in-place will expose every production request to it for each instance that youâve released to.
In a clustered environment, you might first release-in-place to just one of your instances. This practice, most commonly referred to as canary, can mitigate some risk â the percentage of your traffic exposed to deploy and release risk is equal to the number of instances with the new version of your service divided by the total number of instances in your serviceâs cluster.
Finally, rolling back a broken release-in-place deploy can be problematic. Thereâs no guarantee that you can get back to the previous system state even if you rollback (re-release) the old version. Your rollback deploy is just as likely to fail at startup as your currently broken deploy.
Despite its relatively poor risk management characteristicsâeven with canaries, youâre directly exposing some percentage of customersâ requests to deploy riskârelease-in-place is still a common way to do business. I think itâs experience with these kinds of systems that leads to the unfortunate use of the terms âdeployâ and âreleaseâ interchangeably.
Despair Not
We can do much, much better! In the second part of this post, Iâll talk about strategies for decoupling deploy from release and some of the powerful workflows you can build on top of a sophisticated release system.
Iâm an engineer at Turbine Labs where weâre building Houston, a service that makes building and monitoring sophisticated, realtime release workflows easy. If youâd like to ship more and worry less, you should definitely get in touch! Weâd love to talk with you.
Thanks to Glen Sanford, Mark McBride, Emily Pinkerton, Brook Shelley, Sara, and Jenn Gillespie for reading drafts of this post.