Docker is a great tool and in recent years became almost a must-have for many development teams and projects. Why? For many reasons, which I share in detail in one of my previous posts. Today I would like to focus purely on one aspect… money.
Can Docker save my money?
TLDR; Yes, it can.
But let’s see how, and more importantly, how much.
To do so, I would like to introduce you to an imaginary project called RevoCRM. I will use it as a case study, to calculate the impact of Docker on software development costs. Talking about money is always a delicate topic, so I won’t share the details of a particular project, but rather a composition of my experience from a couple of projects I had a chance to work on.
Let’s say that RevoCRM is a gaining popularity CRM tool, for a small-medium size business. It is distributed in a SaaS model and has ~5,000 active subscriptions globally, mostly in the US and Europe. Although RevoCRM is an Amsterdam-based startup, its development team is fully remote and consists of developers from different countries, mostly from eastern Europe.
Currently, RevoCRM uses Docker both for the development and as a part of the hosting infrastructure. But it wasn’t always like that and in this study, I will estimate some of the costs saved thanks to Docker. I will consider the following:
- costs of employee churn;
- costs of everyday development;
- costs of testing and quality assurance;
- costs of introducing infrastructure changes.
Let’s see in detail, how much can be saved thanks to Docker.
How Docker reduces the costs of employee churn?
Introducing the new employee to the team is always a time-consuming process. This is especially true regarding software developers. Software products, like RevoCRM, consist of many different components like databases, services, third-party libraries, and other tools. Each newcomer, before writing his/her first line of code on the project has to install and configure all of these on the computer. Thanks to Docker, right now it is all reduced to one single command:
But in the old, docker-less days of RevoCRM, it took between 4 to 5 days to make the whole platform up and running on a developer's computer. RevoCRM development team is fully remote and each developer has its favorite operating system and configuration. Thus the process was slightly different for each employee. But usually, it was a collaborative work of at least a few people, to help the new developer set up the project on his machine. On average, each new developer spent 36 working hours of his time, and additional 24 hours of other team members trying to help him, which results in 60 hours spent on the initial setup.
RevoCRM development team consists of 8 developers (6 back-end, and 2 front-end developers) and 2 testers. Their average employee churn rate is 20%, which means that every year they introduce 2 new team members. Knowing that the mean hourly rate of a single RevoCRM employee is €30, we can calculate the overall yearly cost saved thanks to Docker:
2 developers / year × 60 hours × €30 / hour = €3,600 / year
Not that much? Bear with me because savings start to accumulate quite quickly when the newcomer and his teammates start their everyday work on new features.
How Docker reduces the costs of everyday development?
Unfortunately, Docker won’t do the coding for you, you will still need developers in your project team 😉 But what Docker can do, is to ensure that whenever one of the developers introduces any changes to the project configuration it will automatically be available for other developers. Before the RevoCRM team switched to Docker, they were constantly struggling with changes in the technology stack. When a new integration, or a database, or some other service was added to RevoCRM, it did not work automatically for all the developers.
Sometimes a small change could prevent the whole team from focusing on their own tasks for a decent amount of time. Most fierce were the fights between back-end and front-end developers. Each side complained that the other one always adds things that do not work out of the box on their machines. Struggling with these technical issues took on average 5 working hours per month, for each developer. Introducing Docker helped to save:
5 hours × 8 developers × €30 / hour × 12 months = €14,400 / year
Docker clearly helps to introduce changes to the technical stack with fewer complications to other team members. But it can also make the change easier for the developer that introduces it. Instead of searching for manuals on how to install some new database server, developers can use one of the available templates (Docker Images) from a publicly available repository called Docker Hub. This can save a day of work every quarter or so.
8 hours × 4 quarters × €30 / hour = €960 / year
Docker helps to reduce the cost of coding. And what about further phases of the development process? Does it also bring some savings in the testing phase?
How Docker reduces the costs of testing and QA?
One of the most important advantages of Docker is that it ensures consistent behavior of software on all the machines. This is true for the developers’ computers, as well as for the test servers. Why is it that important? Because it significantly reduces the time of testing and quality assurance. Have you ever heard of the famous phrase “Strange, it worked well on my machine”? It is a very common issue. Testers blame developers for delivering faulty code but in many cases, that code actually did work on developers' local machines.
Before the RevoCRM team introduced Docker, almost 17% of all User Stories delivered for testing had to be rejected just because testers were unable to make them run and test properly. These Stories had to be then refined by developers, and once again delivered for testing.
The whole ping-pong process was taking approximately 2.5 hours per each problematic User Story delivered for testing. RevoCRM development team is actually divided into two smaller teams, each with 4 developers and one tester. And each of these teams has the capacity of approx. 10 User Stories delivered per month. So the savings in the testing process after introducing Docker looks like this:
2 teams × 10 US × 17% failure rate × 2.5 hours × 12 months * €30 / hour = €3060 / year
Also, the RevoCRM developers were able to better test features themselves, ahead of delivering these to dedicated testers. This was possible as Docker's setup made end-to-end testing simpler for them. Previously, backend developers focused only on introducing API changes but were not validating if these work well with the front end. This reduced overall issues and time spent on bug fixes by almost 10%. By then each developer was spending 20 hours per month on fixes and refinements. Thanks to Docker the time and cost savings were significant:
8 developers × 20 hours × 10% improvement × 12 months * €30 = €5760 / year
Development and testing savings add up to quite a sum, and there is one more aspect that Docker helps a lot with - the infrastructure.
How Docker reduces the costs of infrastructure changes?
Speaking of hosting infrastructure, Docker, combined with additional tools (like Kubernetes or Docker Swarm) brings multiple benefits. Ease of infrastructure management, ease of scaling… just to name a few. I won’t describe all these in detail as it would require a separate blog post. Instead, I will focus on two particular aspects: great portability and lack of vendor locking.
Not so long ago, the CTO of RevoCRM decided to improve their disaster recovery plan. This was perhaps inspired by the recent event that happened to the popular hosting provider OVH. One of their data centers went on fire and burned down completely, leaving a lot of their customers with data losses and services being down for a few days.
If it happened to OVH it may happen to everyone - he thought. And thus, he decided to have at least two hosting providers at a time. Fortunately, RevoCRM was already running on Docker and Kubernetes. Thanks to that, the process of recreating the infrastructure with a second hosting provider was not only possible (no vendor locking), but also was a relatively simple task (because of the portability of Docker containers). Instead of spending a week or so on configuration, the whole process took just around 3 hours! Although it was a one-time job, different infrastructure changes happen every few months, or at least once per year (especially if your start-up has plans on scaling). This particular change brought €2500 of savings. Instead of hiring an external consultant to do the job, the CTO managed to set up the environment himself. And now he can sleep soundly 😉
Summary of savings
Ok, time for the final answer on how much money can you save thanks to a Docker? Let’s summarize all the RevoCRM savings:
Over €30,000 saved each year thanks to Docker. It is approximately 5% of all yearly development costs of RevoCRM. Or in other words, free additional 3 weeks of development hours. Hours that can be spent on at least a few additional features that can be delivered to your end-users each year.
Will Docker reduce the costs also of my project?
Still not convinced that Docker would be a good solution for your development team? Although Docker is a very useful tool and may help you reduce development costs, there are of course some cases in which it won’t be the best choice. Make sure to read my previous post on When to use and when not to use Docker? to see if your project will benefit from Docker.
From my experience, many development teams complaining about Docker simply don't use it properly. In such a case, all the money you could save thanks to Docker may be the lost opportunity. Thankfully, our CTO decided to write a book on Docker optimization. In his book, Michal explains how to work with Docker images and containers to make the most of them. Make sure to recommend it to your dev team.