DEV Community

Cover image for Adopting Database Guardrails - Cultural Shift
Adam Furmanek for Metis

Posted on • Originally published at metisdata.io

Adopting Database Guardrails - Cultural Shift

To build continuous database reliability, you need to have database guardrails - the right tools, processes, and mindset. However, it’s not only about these technical components. It’s a cultural shift that we all need to make. Let’s see why and how.

Database Reliability Is a Must

Imagine your favorite streaming service suddenly losing your watchlist or your bank account mysteriously losing track of your savings - that's the nightmare we avoid with a reliable database. Stripe (the payment company) faced an outage due to changes in their database, Heroku (the hosting platform) faced a similar outage, and Atlassian (the management suite platform)  lost customers’ data. You can’t run your business successfully when your database is unreliable.

Achieving database reliability is not easy. We need to take care of many components, like data integrity, recoverability, performance, and security. However, we need to do it no matter who we are and what our business is. Our customers demand that. The reliability of a database directly impacts the efficiency, reputation, and success of an organization, making it an indispensable asset in today's data-driven world.

You Can’t Do Database Reliability Without Database Guardrails

When building database reliability, we need to focus on all the aspects of our software development life cycle. Starting with the development, we need to analyze the code that talks to the database. We need to make sure that queries use the right execution plans, schema migrations will not take the database down, and we do not send too many queries when one is enough. We need to include these tests in our CI/CD pipelines and run all of them before the deployment.

After deployment, we need to build observability around our databases. We can’t just use metrics. We need to have database-oriented signals instead. We shouldn’t track CPU load per se. We should understand if our database consumes too much of the CPU to meet the business requirements. We need to constantly analyze our schemas, index usage, configurations, extensions, live queries, and everything else that affects the performance.

Recommended reading: How To Master PostgreSQL Performance Like Never Before

Having that said, we need to focus on many aspects. We need to have the right solutions that can prevent the bad code from reaching production, constantly monitor the database in a database-oriented way, prevent the issues from happening, or troubleshoot them automatically. This needs to be done in a human-oriented manner and be easy to use for humans, not machines. But the biggest aspect of database reliability is the cultural shift we need to make.

You Must Change Your Culture

Performance is crucial to providing the best user experience, decreasing churn, and improving all SLAs. We need to make sure our queries are fast. We need to be fast to recover from bugs and have short MTTR. We need to be able to deploy often and have short development cycles. Everything needs to be fast.

The biggest killer in our organizations is not the tooling. It’s the way we run our teams and we share ownership. When developers don’t own their databases, they need to ask other teams for help. Many teams need to communicate and run synchronous meetings or war rooms. This must be changed! Only one team should be responsible for the database. This should be your development team.

Developers need to own their databases. They need to be responsible and accountable for the database performance, reliability, changes, improvements, and security. Unfortunately, developers often lack knowledge and understanding. To aid that, we need to give them the tools described earlier.

How to Drive This Change

It may sound surprising that we should give more ownership to our developers. They are already swamped with many tasks. However, more ownership leads to less work!

When developers do not own the databases, they need to communicate with other teams. They need to explain their requests, maintain Jira requests, and connect with other teams. This communication is tedious and time-consuming. By moving the ownership to developers, we can get rid of this communication entirely. Developers own more but work less.

Recommended reading: Transforming SDLC - A Must-Read For Platform Engineers & DBAs

Similarly, when developers do not work on their databases, they lack working knowledge of the internals. The only way to let them learn and get better is to expose them to everything that happens in the database. However, we can’t just swamp them with raw signals and deep internals. We need to give them tools that can hide unimportant details and only present what’s crucial to make the right calls. Effectively, they can now do the work they would ask others to do, and they can do it faster.

Metis to The Rescue

Metis gives you all the database guardrails you need! Whether it’s reviewing your code changes before the deployment, letting your teams own the databases, or reducing MTTR by efficient troubleshooting - Metis covers all these aspects. You need to have good tools to help you shift left the ownership and unblock your teams, and database guardrails are exactly what you need to achieve that.

It all starts with the good tools. Later, you can build good processes that focus on key performance indicators in your organization. Ultimately, database guardrails are not just tooling. It’s the cultural shift that matters and unblocks your full potential. We do all of that Metis and can help you drive the change. Talk to us to learn more.

Summary

Achieving database reliability is hard and we need to take care of many aspects. The biggest one is moving the ownership to the right teams. We can’t just swamp them with data and signals. We need to reduce their work around communication and bookkeeping and give them the right tools to see only the important database-oriented information. This is not only a technical change, but a much bigger cultural shift.

Top comments (0)