Database as a Service (DBaaS) is a service model that offers automated deployment, high availability, scalability, easy to use and eliminates management of your database infrastructure. There are two options for having “managed databases”, you can either build your own database as a service on premise (private DBaaS), or you can choose a public cloud provider that provides DBaaS services – some of the largest public providers include AWS, GCP and Microsoft Azure.
Running a database as a service within your own data centers means you need to manage everything, starting from provisioning the servers, networking, storage, firewalls, and so on. Next, you need to manage the database services. Installation is not hard, but ongoing operations involve management overhead: continuous monitoring, orchestrating failover and recovery, scaling horizontally or vertically, backup management, security and so on. Building your own database as a service involves expertise in databases and management procedures as well as devops (although you can use software to enable your DBaaS). Also, you need to consider disaster recovery for your database services, with offsite shipping of backups or even a separate DR site.
Using a DBaaS from public cloud providers gives you flexibility, easiness, and less maintenance from an infrastructure perspective. You do not need to think about building the infrastructure and managing it. If a database crashes, it should automatically failover. Backups are managed. Instances can be scaled up or down, and more instances can be added to handle increasing or decreasing traffic The major cloud providers also provide the services in different regions, with at least 3 zones in a region. Availability is a checkbox option.
The convenience offered by the public DBaaS has made it into a very fast growing market segment. Another aspect is the fact that many companies do not have full-time DBAs, especially for their open source databases. So it is harder to manage things on your own when you do not have the people to do it.
Security and Compliance
Since you are running and storing information that needs to be secured, you need to assess and understand the security protocols implemented. When managing your infrastructure, security is a key responsibility and you need to think about things like software patching, monitoring, alerting, vulnerability assessment, firewalls and so on. You build your own policy for your users and you have complete control over security.
Note that running on a public DBaaS still means that you need to think about security, but it is then a matter of configuration rather than building your own security mechanisms.
Compliance is a very important topic that you need to understand in considerable detail. It can lead to issues such as regulatory fines, lawsuits and reputation damage. For instance, private data about EU citizens needs to be stored according to the GDPR and it is getting increasingly difficult to use the large US cloud vendors for this. The GDPR requires that data collected on citizens must be either stored in the EU, so it is subject to European privacy laws, or within a jurisdiction that has similar levels of protection.
Building your own database as a service requires CapEx to rent data centers, buy servers, switches, storage, license software and so on. Besides the initial one time cost, you also need to absorb the monthly operating costs. You need to calculate the total cost of ownership and evaluate the risks of making such an investment.
Provisioning your database on cloud providers gives you a pay-as-you-go scheme, you will be charged based on your instance type, storage disk that you use. Usually, each cloud provider provides cloud cost calculators to estimate your costs. Is the database workload dynamic, or is it stable and predictable? Some workloads are temporary, for instance, infrastructure for analytics on large data sets can be switched off once you’re done. Seasonal workloads include annual tax returns, holiday sales, sports events typically generate high volume of traffic at certain times but not at others.
However, the comparison is not that simple and which option is more or less expensive may depend on who you ask – the cloud provider or a hardware vendor. Moving to a cloud model involves organizational changes so as to fully leverage the cloud model and realize cost savings.