How to Choose a DBaaS

DZone 's Guide to

How to Choose a DBaaS

Will Shulman breaks down how to choose a database as a service (DBaaS), from what a DBaaS is to monitoring, performance, and analytics.

· Database Zone ·
Free Resource

This article is featured in the new DZone Guide to Data Persistence. Get your free copy for more insightful articles, industry statistics, and more. 

With the rise of cloud infrastructure, cloud-based services are available for almost every component of the modern application stack. The database layer is no exception.

Called DBaaS (Database-as-a-Service), cloud database services exist for almost all of the modern relational databases (MySQL, Postgres, etc…), as well as for NoSQL databases such as MongoDB, CouchDB, and Neo4J.

But what is a DBaaS and how should you go about evaluating all of the various DBaaS platforms out there?

This article will explain DBaaS and outline all of the important characteristics one must consider when hosting a production database in the cloud.

What is a DBaaS?

DBaaS providers host your database infrastructure and handle all of the low-level operational aspects of managing your database so that you can focus on application development.

To achieve this, DBaaS providers not only host your database software and your data, but also manage all of the hardware and networking infrastructure beneath it. They also automate all management activities such as provisioning, scaling, failover, and backup / restore, as well as offer support for when you need help.

How to Select a DBaaS

First, you want to make sure you have selected your database technology. Evaluating DBaaS providers ahead of this step would be putting the cart before the horse. You should select the right database technology to meet your application’s technical requirements and then seek out a DBaaS provider for that database technology.

Once you know what database(s) you will be using, you will want to consider the following when assessing DBaaS providers.

Database Location

Not all cloud services need to be physically proximate to your application servers, but your database layer does. This is for two reasons:

* Latency: You want to minimize the amount of time it takes to send a request to your database and get a response as this latency has a huge impact on overall application performance.

* Security: Ideally the network between your application and your database is private and data is not traveling over the open internet.

This is why, for the majority of applications, you should place your application servers and your database servers (via your DBaaS provider) in the same datacenter.

For example, if your application tier is in Microsoft Azure’s West US datacenter you want a DBaaS that can provision your database in Azure West US.

Also, you should consider the extent to which your DBaaS provider locks you into a particular cloud or geographic region. A provider that offers a variety of clouds to run on (e.g., AWS, Azure, Google), can give you peace of mind that you will be able to change cloud providers, or use multiple cloud providers, without needing to change DBaaS solutions.

Fault Tolerance, Availability, and Redundancy

If you are running a production application your database should always be available, even in the face of hardware failure and maintenance. Your DBaaS provider is instrumental in making High Availability a practical reality, regardless of your underlying database technology.

To achieve fault tolerance DBaaS providers usually provide multi-node database clusters that can withstand node failures.

Things to consider:

* Does the provider offer fault tolerance via clustering?

* If so, how isolated are the nodes in the database cluster? Some providers simply spread database nodes across multiple racks in the same datacenter while others have more physically isolated zones such (i.e., AWS Availability Zones). Proper isolation is critical to minimizing the likelihood of downtime.

* How does system failover work? Is it automatic or do you have to intervene?

* How are faulty components replaced? Is it automatic or do you have to intervene?

* Does the provider offer an availability SLA?

* Does the provider offer global disaster recovery (DR) in the event of a regional datacenter outage?

Data Durability and Backups

Your DBaaS provider should have a robust backup and recovery system. You must ensure that you can recover from a catastrophic failure and, more likely, human error (e.g. a developer accidentally deletes data).

Things to consider:

* Does the provider automatically take backups of your data?

* Does the provider have tools for managing backups?

* Can you create recurring backup plans to automatically take backups on a custom schedule?

* Can you easily and quickly restore from backup?

* Does the provider support point-in-time restores, allowing you to restore to any time in the past or only to the time of last backup?

Monitoring, Performance Analytics, and Alerting

You need to ensure that your database is always available and fast. Monitoring, performance analytics, and alerting features that give you insight into the health of your database deployment are crucial.

Your DBaaS provider should provide both uptime and performance monitoring with the ability to generate alerts that get delivered to your team if any important metrics are outside normal operating range.

Things to consider:

* Does the provider automatically alert you when there is a component failure in your deployment?

* Does the provider offer real-time insight into database performance metrics?

* Does the provider offer historical reporting of database performance metrics?

* Does the provider let you create custom alerts based on database performance metrics?

* Does the provider support easy access to database log files?

Performance and Scaling

Your provider should provide a platform that not only performs well for your workload but also can scale to maintain that performance as your data volume grows.

If your application has demanding performance requirements, the best way to assess the service is to test it with your workload. This means, to the best of your abilities, you should try to simulate the operation mix and load that will come from your production app. Beware of benchmarks, as they

are usually so particular to the workload being tested that they may not give a good picture of how the service will perform for you.

If you expect significant growth in either the volume of your data or the amount of database traffic your application generates, you will want to make sure the provider makes it easy to scale.

There are two general techniques to scaling. One is vertical scaling where you add resources (RAM, CPU, Disk) as your deployment grows. The second is horizontal scaling where you add more nodes to the system to handle the growth in data volume and / or database traffic.

Ultimately, if you plan to have a relatively large dataset (hundreds of GB) you will want to make sure your provider has a solution that scales horizontally. While vertical scaling can be very effective, and even preferred at small scale, there is a limit to how much hardware can fit in one box. Horizontal scaling is essential for larger deployments.


Your data may be the single most important asset of your business. As such, your DBaaS provider must be expert in security and able to provide you with tools to ensure that your data is secure from unauthorized access.

Things to consider:

* Is authentication required to connect to your cloud hosted database?

* Is all access to the database logged?

* Can you configure firewalls so that only your application has network access to your database? * Does the provider support communicating with your database via SSL with certificate validation?

* Does the provider support encryption at rest?

* Does the management interface you use to manage your cloud database deployment support 2FA?

* Does the provider undergo third-party penetration testing and security audits to ensure they follow security best practices?

* Does the provider have any security and compliance certifications that are required for your organization, such as HIPAA?


Fast, helpful support is a crucial component in ensuring your database and your application run smoothly. Your provider must provide great support, particularly when providing advice and responding to emergencies.

Things to consider:

* Does the provider offer support as part of the subscription or is it an additional fee?

* Does the provider offer premium or emergency support with guaranteed quick response times?

* Does the provider offer a SLA around support response times?

* Is the support actually thoughtful and helpful? Contact them with a database or vendor-specific questions and see how timely and helpful their response is.

* Does the provider have a good reputation for outstanding support?


The right DBaaS provider can be an invaluable partner, but finding the right cloud service for your application requires research and forethought. Hopefully this mini-guide will help you frame your investigation and offer some guidance on what to look for.

For more insights on data tools and solutions, persisting data on mobile devices, and choosing a DBaaS, get your free copy of the new DZone Guide to Data Persistence!

data persistence, database, database as a service, dbaas

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}