I'm going to start off by defining continuous delivery. This is my definition. Continuous delivery is the ability to get changes, whether that's configuration changes, bug fixes, database changes, features, or even experiments, into production or if it's user installed software or an app, into the hands of users safely and quickly in a sustainable way. By safely, I mean in a low-risk was. Quickly speaks for itself. Sustainably means without working crazy evenings and weekends instead of our daily work.
Why is continuous delivery important? The reason that continuous delivery was initially created by Dave and me and the other people involved in the movement was because we were sick of these crazy releases we were doing, working weekends in the data sensor, working evenings, having crunch times, and just having terrible releases, where a bunch of things went wrong. We thought there must be a better way. We discovered there was. So, continuous delivery primarily was about making releases painless, low-risk events.
I sometimes joke that releases should be boring and there's some truth in that. We should be able to push a button to release in the middle of the working day without any adrenaline in anyone's blood stream, in terms of the actual tactile release process, at least. However, continuous delivery, it turns out, has many other benefits, which explains it's popularity today. The same things that enable you to reduce the risk of release, also allow you to get changes to market faster and this is one of the crucial benefits for businesses is that it makes it much faster to get ideas released into production, and get feedback on those ideas to find out whether they're any good.
Fundamentally, continuous delivery changes the economics of software delivery, which reduce the time for getting changes into production. Then you can do that over and over again in a really low-risk way. The same practices that enable you to reduce the risk of releases also increase software quality and stability. Many of the things we're going to be talking about in these [lob 00:02:10] lessons are about actually building quality into the product, this idea of shifting left, automating a bunch of the testing, and the build and deployment process. That helps build quality into the product and make sure that the work that developers produce is of high-quality before it even goes downstream. It increases the quality of the software and the stability of the systems and the services that we build.
Investing upfront in a lot of this work to automate deployment and testing and bells and provisioning and maintenance and management of infrastructure, in turn reduces the cost of ongoing development. It makes it cheaper to enhance, involve, and maintain your software once you've built it. There is an upfront investment in these capabilities, but it pays off big time for systems that are going to evolve and change over time.
Finally, it actually makes things better, both for our customers and our employees. Being able to respond quickly to customer requests to bugs to other problems that customers are having or just making their lives better makes them happy. One thing that people sometimes, raises an objection to continuous delivery, is our customers don't want a ton of change. My response is, if the change is making things worse for them, yes that's true, but the key thing is we're not trying to take big releases that take months of work and perform those 10 times a day, that's not what this is about. It's about releasing a series of much smaller changes rapidly.
For example, Amazon.com is changing all the time and it's changing differently for different users because they're [AB 00:03:43] testing their ideas. Most of those changes you don't even notice. It's like, the fable of the boiling frog, and the idea is that as things gradually change, a lot of time you don't even notice those things. What's happening is the system is slowly and consistently getting better and more powerful and you're able to satisfy your customers much more quickly. So, this idea that people aren't going to want continuous delivery I don't think is true. People certainly want things to get better and if you can make things better for them consistently that actually is a big win for your business.
Finally, continuous delivery makes employees happy because instead of doing these big bang releases, and frequently, with making release part of our daily work and so they're not big bang events that make people miserable. Furthermore, you actually get to see the results of what you're doing really quickly. I've certainly worked on projects where we've been working on the software for months and I've rolled off before that software even went live. I never got to find out if it was actually valuable to people.
Being able to make a small change, push it out there, see how people react to it, evolve a feature, discard the ones that don't work, and then find ones that are really amazing and that people love. That's profoundly satisfying to be connected to your customers and your users and to be able to interact with them in these rapid cycles. It's key to the ability to create these fast feedback loops and make people happy. No one I know has worked in a high-functioning continuous delivery environment wants to go back to the old way of doing things.
Let's turn to what continuous delivery is replacing. Many agile adoptions I've seen in real life tend to not go the whole way through the organization. Instead the actual adoption creates what, Dave West from Forester, once called water-scrum-fall. The idea here is that even though we've got some agile software development happening, we still embedded within this kind of project and program management para-dine, where we have to get budget approval for any new piece of work of any size. That has to go through a very painful process. We have to do requirements, gathering, and detailed analysis and estimation, and so it might take weeks or even months before we can even get started on the work.
That process, sometimes called the fuzzy front end can take weeks or even months in some cases. Only then can we start work on software development. Even if we're working in nice iterative cycles here, we're not necessarily delivering software to users at the end of those cycles, those iterations. Instead what happens is once we're def complete with that work it goes through to integration, and then it has to be tested, and then hopefully we fix some of the bugs that we found in testing, and then it gets tossed over the wall again into IT operations. This big piece, the last mile as it's sometimes called, is very painful and unpredictable. One of the main goals of continuous delivery is to make that whole last mile go away. It should be possible, not just to have a potentially ship-able increment, but to actually ship to users at the end of every iteration or sprint.
In fact, if we're doing it really well, even within those sprints or iterations, to be able to push out much more frequently even than that. If we're doing that correctly we get rid of the whole last mile and we take that work and we build it in to the development process, and this is what's sometimes called shifting left.
Once you build that capability it then becomes possible to start attacking the fuzzy front end and thinking differently about the way we develop products. I'll talk about that in the next section of this lesson.
When confronted with the reality of many agile adoptions and enterprises, you've got to ask is there a better way? And the answer is, of course, there's a better way. I like to show this slide from a presentation that Amazon gave at the Velocity Conference back in 2011, where they talk about the fact that in their production environment they're deploying every 11.6 seconds to production, on average, making up to 1,079 deployments in a single hour. On average 10,000 boxes receiving those deployments and up to 30,000 boxes receiving those deployments. Now, granted this is aggregated across the thousands of services in Amazon's production environment, but still very, very impressive. In fact, there's a presentation from this year where they talk about how they're doing 50 million deploys per year, as of last year, which is an order of magnitudes better than this, in terms of time between deployments.
Bare in mind also, that Amazon is regulated by [inaudible 00:08:10], it's a public listed company. They process credit card transactions so they're PCIDSS regulated. They're a highly regulated company that processes enormous amounts of money on a daily basis. They face significant pain achieving this outcome. It cost them a lot of money and a lot of time, and there was a four year re-architecture that enabled this, but it was worth it for them for reasons that we'll explore in the next section.
Just to recap from this section. The key principles of the heart of continuous delivery is building quality instead of trying to test towards the end of def complete. We're going to build quality into our products. We're going to make sure that defects are fixed and that we address our non-functional characteristics to the system at development time. No body, neither developers or testers or operations people can say they're done with anything unless it's shown to be releasable to production. Developers don't get to say they're done when it's def complete but it's not tested and we haven't' low-tested it or shown that it's going to work in a low-scale production system. You have to make sure that that's part of your definition of done, and everyone has to be responsible for that.
Secondly, we're going to talk about working in small batches. The reason we do these huge waterfall releases is because the transaction cost of pushing changes out is so high. Continuous delivery changes the economics so that it's cheap to take small changes and push them into production or to app stores or to make releases of better systems. What that means is, we can work in small batches, in small individual chunks, and that in turn means we can get faster feedback on the work we're doing, which enables us to learn how to build software better, and how to make software that's actually valuable to our users.
One thing we want to do is make sure that computers are doing the repetitive tasks and that people are solving problems. My partner in crime, Neil Ford, has a joke that when human being do the jobs that computers could do instead, the computers get together late at night and laugh at us. Nowhere is that more true than if you have human beings doing boring repetitive tasks, like manual regression testing, or typing in deployment scripts or manually provisioning middleware operating systems through a [QQUI 00:10:18]. All that stuff should be done by the computers so the humans can focus on what they're really good at, which is problem solving when things go wrong with those processes and designing, and evolving them over time. That's the key concept to the heart of lean thinking, is this division of labor between computers doing the boring repetitive stuff and people doing the problem solving and focusing on the high value activities.
In order to get really good to continuous delivery, and in order to really create an organization, which is able to pursue it, you need to pursue continuous improvement. All the work that we're talking about through these [lob 00:10:49] lessons is stuff that is not just building features. It's building an engine to build features. You've got to regularly maintain and improve that engine as your organization and the systems that you're building evolve. You're never done with any of this stuff. We always try to get better and pursuing that idea of always getting better and enabling everyone on our team to experiment with ideas to get better is really at the heart of adopting and implementing continuous delivery.
Finally, all of us are responsible for that. If we live in a world where developers are responsible for [inaudible 00:11:20], testers are responsible for quality, and IT operations are responsible for stability, we're never going to win. Everyone has to be responsible for the system level, business level, customer outcomes. It's not, well, I've done my bit, now you go do yours. Continuous delivery can't work in that system because we all have to be responsible for the outcomes. We all have to work together in order to achieve them.