Developers and DevOps engineers donât own their databases. They query the data, they implement schema migrations, but they rarely maintain databases, tune the performance, and solve the issues when they appear. Instead, developers get help and support from the operations teams and database administrators.
Is this efficient? We learned with the DevOps movement that minimizing communication and putting people together to work hand-in-hand improves performance and makes the organization work faster. We also learned that DevOps engineers can efficiently manage both the development and deployment parts of the software development lifecycle. However, we rarely do that for our databases. In this article, we explain why shifting the ownership of the databases to developers and DevOps engineers is a must and how to achieve that.
Recommended reading: Why DevOps Should Own Their Databases and How to Do It
Why We Need the Shift of Ownership
When developers donât own their databases, they canât maintain the performance and fix issues on their own. They need to have support from other teams which poses multiple challenges. Letâs see these challenges to understand why we need to shift the ownership to the developers.
First, developers often donât have access to the production database. They canât access the data, they canât see the performance metrics, they canât check how the database is configured. This makes it much harder to reason about the performance when it goes down. Developers canât see what indexes would be helpful or what the data distribution is. Whenever there is a need to tune the performance of the applications accessing the database, developers need to rely on other teams to provide enough insights on whatâs going on and how to improve it.
Human communication is slow. Opening tickets or issues to other teams, coordinating the communication, and making sure artifacts (logs, traces, schemas) are delivered promptly is hard. We already learned with the DevOps movement that itâs beneficial to minimize communication. We need to do the same with our database management. We need to minimize or even eliminate communication and let developers work on the issues in a self-serve manner. Slow communication makes people work less efficiently and makes troubleshooting much longer due to more context switches. Everyone involved in the communication works on multiple things when waiting for the response and this leads to feeling overloaded. One of the principles of Kanban is tolimit the work in progress. The more communication we have, the more work in progress we need to deal with.
Another issue is the lack of motivation. If developers donât own their databases, they feel detached from the problems. The ânot my jobâ attitude leads to more issues because people donât try to prevent them as itâs not in their ownership. This is often connected to not being exposed to the actual clientsâ feedback and how people use the application. There are many ways to motivate people to do more and still feel less tired. Lack of motivation also makes people leave the company more often which makes others less efficient as they need to spend more time on onboarding and transferring knowledge.
Yet another issue with lack of ownership is the lack of development of skills. Developers do not learn databases because they donât work with them. Even if they wanted to work on their own, itâs much harder because they donât gain the practical working knowledge of the systems. They only raise issues and wait for others to provide solutions. This makes people feel siloed even more and never leave their comfort zones. To let people develop, we need to challenge them and let them solve problems they are not familiar with. This is loosely connected to a fungible developer that was popular in the industry. The idea is to be able to replace developers with other developers with no loss (or gain) in productivity. While this sounds great in theory, reality shows that it doesnât work. However, lack of ownership makes developers feel less attached to the products and it makes them fungible.
Finally, a lack of ownership means that more teams are needed. This simply increases the cost as more people need to be involved in the work. Increased costs obviously limit the potential of your company and make your business run less efficiently. Just like we want to optimize our CI/CD pipelines to work faster and cut on resource usage, we should achieve the same goals with less work and fewer people so that others can work on something else.
Three Pillars of Ownership
What we need is true ownership of databases. Developers need to own their databases the same way they own their code and deployments. There are many reasons for that and many benefits. However, we know they canât take the ownership on their own and they need help from other teams like platform engineers. There are three things that developers and DevOps engineers need to own their databases:
- Database Observability and understanding built with tools that are database-aware and database-focused
- Processes that define how to use the database observability tools and how to proceed in a self-service mode
- The mindset of the true owners
Letâs now examine each of these in detail.
Owning Databases with Database Observability
To own a database, developers need to have tools that let them peek behind the scenes. These tools cannot just show raw metrics like CPU consumption. They need to focus on database-oriented details around transactions, execution plans, background tasks, fragmentation, partitioning, sharding, and many other things that are specific to databases.
Additionally, these tools must bring an understanding and coherent story. They need to connect multiple dots to present the flow and evolution of the system. They need to be aware of deployments, migrations, traffic patterns, and other intricacies of the database world. They need to be aware of the database engine edition and capabilities to suggest better solutions that developers can use.
Recommended reading: Observability vs Monitoring: Key Differences & How They Pair
What Database Observability Brings
Proper database observability has multiple benefits:
- Observability can bring a coherent story that explains what happened. Instead of examining raw metrics, it can show the true understanding of whatâs going on from a business perspective.
- They can set thresholds for alarms and alerts automatically as they can observe the actual performance and see how it changes when background tasks start or when the traffic changes.
- Observability tools can troubleshoot issues automatically since they can track the database configuration and changes, and they can submit pull requests automatically.
- Observability tools can detect anomalies more easily as they donât need to wait for historical data. They can just track the deployments and see whether changes are expected or not.
All these things result in the following improvements to KPIs:
- They reduce mean time to repair (MTTR) and mean time to detect (MTTD)
- They reduce communication effort as developers donât need to reach out to other teams
- They increase the ability to self-serve the issues and free up the capacity of people (database administrators, developers, DevOps engineers, etc.) as they donât need to be involved in troubleshooting that can be done automatically.
How Metis Helps with Database Observability
Metis brings database-oriented dashboards. They show the true insights into what happens with the database, configuration, data volume, and maintenance tasks: