What is a Serverless Database?
A serverless database is a fully managed database-as-a-service (DBaaS) that allocates and scales compute and storage resources automatically and elastically with demand. Going with a serverless database allows developers to fully focus on architecting and building applications, while outsourcing operations like provisioning, managing, and scaling resources needed to run those applications to cloud providers.
Servers are still needed in serverless, but developers don’t need to worry about their management. Serverless databases use a pay-as-you-go pricing model. Instead of paying for servers and their capacity, customers only pay for the resources their applications use, such as function execution time, persistent storage space, or number of read and write operations.
Serverless databases defined
Let’s look at the defining characteristics of a serverless database. A serverless database:
- Is a cloud-based database service that can be used by an application via well-defined APIs. For example, serverless database is available as a cloud service that runs in multiple clouds, including AWS, GCP, and Azure, and is accessible via multiple APIs, including REST, GraphQL, and Document APIs.
- Is a fully managed service. This means a cloud service provider manages normal database maintenance and operations, including backup and restore, security and encryption, monitoring and performance tuning, and more. For example, DataStax Astra DB automatically deals with data replication and server failures, supporting applications that require high availability.
- Has built-in auto scaling. Compute and storage resources are allocated and automatically and transparently scaled up or down to meet continuously changing demand. DataStax Astra DB can quickly scale up to accommodate demand spikes for applications requiring high throughput. It can also automatically scale down to save resources and costs when demand declines.
- Does not expose any information about backend servers to database service users. Instead, users see database usage information, such as how many read and write requests were executed and how much storage was consumed. Serverless database users are billed based on usage, not the number and type of servers. Astra DB bills customers based on data movement and storage, as well as the number of read and write request executions.
The main benefits of serverless databases
Higher productivity and simpler operations.
With no infrastructure management, no capacity planning, and no manual scaling, operations are greatly simplified. Developers can spend the time saved on application design, business logic, and coding. The result? Higher productivity and faster time to market.
Reduced operational costs.
Serverless databases can significantly reduce operational costs. There is no need to pay for data centers, servers, networks, power, cooling, or human resources. Cloud service providers are able to accommodate multiple tenants sharing the same infrastructure and services, resulting in lower costs for each individual tenant. Furthermore, a serverless database user only pays for usage, such as space consumed and requests executed. As an example, Astra DB is able to use and share resources very efficiently, making it possible to compared to a self-managed database.
Elasticity and auto scaling.
Automatic scaling, up and down with demand, is an exceptionally important feature of serverless databases. It reduces costs by scaling down when demand is low, and increases availability and throughput by scaling up when demand is high. Elasticity and auto scaling are at the core of any serverless database design.