Skip to main content

Continuous Delivery: Decouple release from deployment

For most organizations releasing and deploying are the same thing while in fact these are 2 separate things:

  • Deployment: A technical handling where a new version of the software is deployed to a specific environment
  • Release: A business handling where the customers are informed that a new version of the software is available and can be used

As you combine these 2 handlings in one, releasing becomes a risky business. The same moment you roll out the code on production, your users are eagerly waiting to start using these new features they so desperately needed.  At that moment, you don’t want that things go wrong.

So what do most organizations do? They introduce long release cycles where an application has to go through multiple environments and test cycles before finally reaching production.And they try to reduce the risk by only going through this cycle one or 2 times a year.

But while they are thinking that this limit the risk, it actually has an opposite effect. The moment Murphy kicks in (and it will) you’re into trouble. Why? Because you have to go step by step through this really long release cycle again before you can apply your patch or hot fix to production. By then this fix is not so ‘hot’ any more. And in the meanwhile error reports keep coming in…

Now this is the theory, what I see in practice (a lot!), is that when there is really something wrong on production, the whole process is thrown out of the window and the solution is deployed immediately  to production. Wooops, maybe not the best idea either?!

Could there be a better solution?

Of course! Otherwise I shouldn’t be writing this blog post. First of all, let these 2 handlings(deployment and release) remain separate things. Deploy your feature to production as soon it’s ready but hide it from the users. Later on, you can do a ‘release’ and enable the feature on production just by toggling a configuration switch. Even better is that you can gradually enable a feature for a subset of your users. The moment you notice that performance is going down or exceptions start appear, you can easily disable the feature again and fix it without impacting the users. This is exactly the approach that companies like Facebook and Amazon are using.

Now one important recommendation I want to make is to go one step further and split out the deployment itself in multiple steps:

  • In step 1, you deploy your database changes. No code changes are deployed yet. Of course this means that database changes should happen in a non breaking fashion. For example, if you add a new required database column, make it nullable first or provide a sensible default.
  • In step 2, deploy your application change.  When you’re ready announce the release and enable the feature.
  • If everything is working as expected, you can continue to the last (optional) step and update the database again. For example, for the new column you created before, you can now make it not nullable and remove the default value.

This provides a fault tolerant approach in handling releases and is a first step towards continuous delivery.

Popular posts from this blog

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

Kubernetes–Limit your environmental impact

Reducing the carbon footprint and CO2 emission of our (cloud) workloads, is a responsibility of all of us. If you are running a Kubernetes cluster, have a look at Kube-Green . kube-green is a simple Kubernetes operator that automatically shuts down (some of) your pods when you don't need them. A single pod produces about 11 Kg CO2eq per year( here the calculation). Reason enough to give it a try! Installing kube-green in your cluster The easiest way to install the operator in your cluster is through kubectl. We first need to install a cert-manager: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml Remark: Wait a minute before you continue as it can take some time before the cert-manager is up & running inside your cluster. Now we can install the kube-green operator: kubectl apply -f https://github.com/kube-green/kube-green/releases/latest/download/kube-green.yaml Now in the namespace where we want t...

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Col...