Is Serverless the Next Step for Cloud Databases?

Since the advent of cloud computing more than a decade ago, many have been waiting for a resilient fully cloud-based database that could expand (and even shrink) its footprint dynamically and would eliminate the significant operational effort of maintaining a production database system.

Really flexible, native cloud databases have come out — Amazon’s DynamoDB and Microsoft CosmosDB, for example — but even now that we’re past the cloud database tipping point, the majority of cloud-based databases are running the same software as their on-premises counterparts.

A modern distributed database platform like MongoDB or CockroachDB can be run as a fully managed cloud service with pleasure. And the advantages of doing so are real; When you buy MongoDB Atlas or CockroachDB’s custom cloud service, you get a highly functional database set running on a dedicated cloud infrastructure, but the OPEX is largely eliminated. It’s a good deal. However, these types of “ad hoc” deployments are not quite what the “elastic” cloud originally promised. In particular, you have to pay for the hardware that hosts your group, even when there is no workload running.

Serverless Cloud Offers

To bring us closer to the ideal of a fully flexible, all-cloud database platform that pays only for what you use, MongoDB and CockroachDB recently announced “serverless” cloud offerings — and you can bet other database vendors will be quick to follow.

In a serverless offer, you really only pay for what you use. Of course, databases are hardly stateless, so if you store terabytes of data you’ll get a storage cost, regardless of usage, but you’ll only pay for CPU and I/O if you run the workloads.

Both MongoDB and CockroachDB ship in terms of abstract units – MongoDB uses read and write processing units (RPUs and WPUs) while CockroachDB uses “request units”. Both are roughly equivalent to a very simple database request—a single row or a document search by index, for example.

Under the hood, both serverless offerings use a common rental architecture. In the case of CockroachDB, the data of each serverless database is stored on shared storage nodes. As workload requirements increase, CockroachDB launches processing nodes to perform SQL and transaction processing. MongoDB uses a similar approach. And sellers give you a free, guaranteed number of order units per month.

The advantages of a serverless approach are very important for applications with variable workloads – as in almost all applications. In current offerings, you build up enough resources to handle peak periods – which usually means you’re wasting money during lows.

Key considerations

However, Serverless may not be suitable for everyone. In a serverless deployment, your application shares some physical resources with other users without a server. In particular, a single storage node will contain data from multiple users. Of course, you can’t see data from other users, but some organizations with very sensitive security requirements may find this “shared rental” unacceptable.

This shared rental also allows for the possibility that a “noisy neighbor” can disrupt your performance. Furthermore, during periods of reduced activity, your data in the cache may be overwritten by data from other tenants. When your application starts to overload backups, it will encounter a “cold cache” scenario in which physical I/O rates are higher than normal.

Offline to the server, you can “cover” your bill with a certain amount; If your resource usage exceeds this maximum, you will be re-limited to the performance limitations offered by the free tier. There are, of course, ways to monitor and manage your resource usage, but, nevertheless, if you don’t care about your application’s workload, you may be surprised by an unusually large bill or resource throttling.

budget requirements

These are minor drawbacks, however, when compared to the powerful economic benefits of paying only for the CPU and memory you’re actually using and the ability to quickly scale up resources when the workload is required. I expect serverless offerings, like those from MongoDB and CockroachDB, to be very popular!

Leave a Comment