Advanced Computing in the Age of AI | Friday, March 29, 2024

Treat Your Databases as Cattle, not Pets 

(martinho Smart/Shutterstock)

Today, databases have to be treated like pets. Each is special and receives individualized care and attention. At scale, and with the need for greater agility, the issue of maintaining large numbers of pet databases becomes a problem.

This raises the question: what if databases could be treated more like cattle – as a herd rather than with special individual treatment?

Many things get in the way of the “cattle approach.” These include the sensitive nature of the data itself and security requirements, as well as needs for high-availability and specific performance levels. Also, there are more database types than flavors of ice cream. For good reason developers want access to these different database types designed to meet the needs of specific applications.

In the face of this challenge, let’s look at the potential of a database as a service (DBaaS) that aims to treat databases more like cattle. This DBaaS model is designed to make it possible to manage multiple types of databases economically.

This approach treats all DBMS technologies (relational and non-relational) in the same manner. The DBaaS platform supports a variety of relational and NoSQL databases, allowing developers to choose the best database for their application. The different database types maintain their unique characteristics, yet in their overall lifecycle management they are treated like cattle as much as possible, less like pets.

The characteristics of this DBaaS requires a single, common management infrastructure that provides a simple, unified way to handle complete database lifecycle management including: provisioning on-demand from a choice of diverse database types; managing backup and restores; securing with user permissions and automated patch management; log file retrieval; and a lot more.

Architecture Standardizes Management

The key elements of this DBaaS architecture are the controller, guest agent and guest images. At the heart of the system is the controller which is largely database-agnostic. Users interact with the controller through GUIs or APIs to manage databases of all sorts. If the user wants to perform a backup or create a replica of a database, they don’t have to worry about the specific calls required to do that for some particular database engine.

The guest agent is the “database adaptor” which translates commands of the specific database. To support a new type of database, it’s possible to implement a new guest agent that implements the necessary APIs that allow the user to manage that datastore in a standard way – like herding cattle.

These guest images are simply virtual machine images that bundle the database server software and operating system along with the database version-specific guest agent code. Guest images make it possible for different databases to plug-and-play – effectively transforming them to cattle in terms of overall management.

When a guest image boots, it produces a full-service, ready-to-use database instance, eliminating the need to provision and configure the database from scratch. Guest images can be configured by the operator or downloaded from publicly-available sources.

In addition, guest images can be pre-built in optimized configurations that are tuned to deliver optimal performance and to conform to industry best practices for security and reliability. These standardized configurations also make it easier for IT staff to manage these systems. When a new security alert is issued by a database vendor to address a newly found vulnerability, the guest image can be replaced with a patched version and all the systems that are subject to the issue can be updated en masse.

This kind of DBaaS design approach makes it possible to manage multiple instances of different database management systems, both relational and NoSQL, using a common infrastructure and user experience. The result is that it is possible to select and operate a database – while retaining all its capabilities – in a secure private or public cloud. The different database types are herded like cattle for handling routine tasks like provisioning, configuring and monitoring.

Specifically, administrators can perform a variety of functions in a unified, simplified way, treating databases more like cattle than pets, including:

  • Spinning up instances
  • Creating replicas
  • Resizing instances
  • Adding users and databases
  • Managing database backups
  • Changing the instance configuration

By separating provisioning and management from the intricacies of accessing data within individual databases, this DBaaS design makes life easy for both developers and operators. It provides self-service capabilities for developers to provision databases that they can query and update in the manner that they are used to on whatever database is best suited for the task at hand. At the same, operators can manage all of these database technologies in a consistent way without requiring that they be experts in a particular database. In effect, the database becomes just another service rather than a time consuming central focus.

The net result is a new model for how enterprises interact with their databases.

Amrith Kumar is project technical lead for OpenStack Trove DBaaS project as well as founder and CTO of Tesora, Inc.

EnterpriseAI