The database is one of the most critical components of software infrastructure. Usually, that’s where you store all your important data. Properly managing databases is not an easy task—especially nowadays, when microservices architecture is popular. In such an environment, you’ll probably find more than one database. Moreover, it’s not uncommon in microservices environments to use different databases (MySQL, PostreSQL, MondoDB, etc) in one application. This creates even more maintenance work needed. That’s why the database-as-a-service model, or DBaaS, has become so popular. In fact, DBaaS is one of the fastest-growing among all SaaS offerings. In this post, you’ll learn what exactly DBaaS is and what benefits it brings.
What DBaaS Really Means
As we mentioned, DBaaS stands for database as a service. Okay, but still, what does that actually mean? It means that someone else (a cloud provider) will manage your database for you. That’s why DBaaS is also called “managed databases.” Like with any other SaaS, the primary goal is to take care of all your maintenance tasks so you can focus on what’s important to you—writing and reading the data from the database.
Provisioning
What exactly do you gain by using DBaaS? Let’s start with provisioning a database. Typically, when developers need a new database, they usually start by opening a new ticket with the operations team. The Ops team then needs to provision a properly sized virtual machine. Then, they need to install the required database engine on that VM. After that, they need to configure it to have a secure and performance-optimized setup. Depending on how many steps your company automates, provisioning a database can take a few hours up to a few days.
How does provisioning a database go with DBaaS? You only need to send an API call or make a few clicks in the UI, and after a few minutes, your database will be ready. As you can see, there is a significant improvement already in provisioning. But advantages don’t end here.
Operations
Provisioning a database is one thing, but keeping it healthy and up to date is another story. Making backups, upgrading to the latest version, monitoring—all of these need to happen to keep a database in a good state. Performance tuning is usually also an ongoing task and requires deep knowledge of the specific database engine you use. If you use different databases for your application, then all of the tasks and skills needed multiply. Database as a service takes care of those things for you. Most of the DBaaSs offer simple on-click operations that developers can perform themselves. There’s no need to know and understand specific tools. Say you want to back up the database. You can simply click “create backup” in the UI. Actually, you probably don’t even need to do that because most DBaaSs create backups automatically for you.
Scaling
Another huge advantage of DBaaS is scaling capability. Not only can it scale as much as you need it to (and often beyond that), but it can also scale in a matter of minutes. In traditional infrastructure, you need to again provision virtual machines, install a database engine, and configure it to be part of the existing cluster—and then you have to wait for it to sync. You are also limited to the capacity of your datacenter or quota of your cloud account. On the other hand, DBaaS offers advanced scaling techniques, like automatic scaling based on load or triggers. In short, it’s much easier and faster to scale with DBaaS.
Living With DBaaS
As you can see, using DBaaS can improve the lives of both developers and Operations teams. Developers get faster provisioning and (usually) more control and self-service capabilities. And Operations doesn’t have to bother with complex and time-consuming database provisioning and management.
Of course, it’s not a “set it and forget it” solution. While DBaaS does most of the maintenance for you, some tasks (depending on the specific DBaaS offering) may still stay on your plate. Also, without proper governance on your part, you may get surprised with high bills. If scaling isn’t limited properly, developers will be able to spin up DBaaS without any restrictions. These “disadvantages,” however, apply to any software as a service, so you should already be aware of them.
Some DBaaS Examples
There are many different DBaaS solutions on the market. Here are some examples and some things to look for when choosing a DBaaS solution.
Amazon RDS
Amazon was one of the first cloud providers to offer DBaaS, and its RDS (Relational Database Service) is one of the most well-known DBaaSs on the market. It’s a mature solution that offers almost unlimited scaling, thanks to Amazon’s infrastructure. However, it’s not exactly the easiest to start with; beginners may have some difficulties working with it. With proper guidance or training, however, it’s a great DBaaS.
Microsoft Azure SQL Database
Similar to Amazon, Microsoft offers its own DBaaS. Azure SQL Database has many features, including machine learning–based “intelligent automatic tuning,” which automatically identifies potential problems and recommends solutions for them. It’s a good choice if the rest of your infrastructure is already running on Azure. Unlike RDS, Azure SQL Database is known for its ease of use. It’s used not only by developers but also by business analysts and other nontechnical users.
Google BigQuery
Google’s DBaaS focuses a bit more on big data projects. It’s very flexible and allows you to inject almost any type of data into the database. This flexibility, however, comes with a price. Google SQL implementation is based on several SQL dialects, so it can be a bit confusing sometimes. But then again, it offers real-time data analysis and other benefits. Overall, BigQuery is very friendly for anything from big data to machine learning.
MongoDB Atlas
On the other side of the spectrum, there are products like MongoDB Atlas. This DBaaS is much simpler to use than what the big cloud providers offer. As a result, many developers enjoy MongoDB Atlas. It offers a user-friendly interface, flexibility, and control. Of course, it’s a NoSQL database, so it won’t be suitable for applications that require SQL.
DigitalOcean Managed Database
Similar to MongoDB Atlas, DigitalOcean DBaaS is extremely simple to use. However, it does offer SQL databases (MySQL and PostgreSQL) as well as Redis. It has everything that you would expect from DBaaS: free daily backups, automatic failover, and easy scalability.
How To Pick One
These are just a few examples of DBaaSs. There are many more on the market. How do you know which one to pick? Does it even matter which one you choose? It definitely does. It all depends on your needs.
If you have a small application, don’t produce terabytes of data, and just want to give your developers an easier way to provision databases, you won’t benefit much from a DBaaS designed for complex big data processing. It probably will be too difficult for developers to “just create a database” if they only need a simple MySQL database. In such cases, you’ll probably find solutions like MongoBD Atlas or DigitalOcean Managed Database better.
On the other hand, if you plan to integrate a few different data sources and run complex data analysis, and you expect spikes in data, you may find more a complex DBaaS like Google BigQuery more suitable. It usually comes down to whether you prefer ease of use and fewer things for Operations to manage, or scalability and amount of features and data types supported.
Event Data Cloud
Now that you know what a DBaaS is, let me introduce you to the Event Data Cloud. It’s a slightly different approach to having a database-like system in the cloud. Nowadays, applications usually require more than just a simple database. More and more often, systems run stream-processing software, log-analysis systems, or big data business analytics. Event Data Cloud provides one solution for this growing data processing ecosystem. Instead of building a few different clusters that usually use the same data, you can use Event Data Cloud. Event Data Cloud decreases the complexity of the infrastructure and lowers the cost at the same time. If you want to know more about what Event Data Cloud is and how it compares to a typical DBaaS, check this whitepaper from Scalyr.
Summary
Hopefully, you enjoyed our journey of learning about databases as a service. You understand its benefits, know about some examples of DBaaS, and can pick one that suits you best. If you want to take your databases to the next level, remember to check the Event Data Stream whitepaper. Good luck!