Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

Serverless Databases Compared: 9 Options for New Apps

For a typical web app or SaaS backend, a serverless Postgres service that scales down when idle and lets you branch the database is where I'd start. SQLite-based services suit apps that want a separate database per user or tenant, and key-value stores suit caches, queues and very high request volumes.

A database used to be a server you paid for whether anyone touched it or not. A serverless database turns that around: you create it through an API or a dashboard, it scales with load, and the bill follows what you use rather than a box sitting idle overnight. For a side project, an early SaaS product or an AI agent that needs its own scratch database, that difference is the whole point.

The word covers very different products, though. Some are Postgres with the servers hidden, some are SQLite moved into the cloud, and some aren't relational at all. So the first job is matching the type to the app, and only then comparing vendors.

How the nine options group by database type

Here's how the options on this page group, by the kind of database underneath.

Type of databaseFitsCheck before you commit
Serverless PostgresGeneral web apps, SaaS backends and anything that wants SQL, joins and extensionsHow long the first query takes after the database has been idle
Multi-tenant PostgresB2B apps where each customer's data should sit in its own tenantHow tenants are created, isolated and moved
SQLite-based cloud databaseA database per user, agent or tenant, or apps on an edge platformWrite limits and how replicas catch up
MySQL-compatible distributed SQLTeams already on MySQL tooling, or workloads mixing SQL with vector searchWhich MySQL features and drivers behave the same
Key-value and Redis-styleCaches, rate limits, sessions, queues and very high request ratesWhat happens to cost when request volume spikes

I'd expect a typical web app to belong in the first row. I'd only move down the table when there's a clear reason: a tenant model, an edge platform you're already on, or an access pattern that's lookups by key rather than queries.

Serverless Postgres services

Neon

Serverless Postgres with database branching, plus companion object storage and functions that sit alongside the database itself.

Xata

Branch-native Postgres that scales to zero when idle and creates instant database clones through a simple API.

Nile

Postgres re-engineered for multi-tenant B2B apps, with tenant-aware databases and authentication built into the platform.

Prisma Postgres

Managed Postgres for TypeScript and AI apps, wired directly into Prisma's ORM and the rest of its tooling.

SQLite, MySQL-style and key-value options

Turso

Built on SQLite, this cloud database is designed to spin up a separate database for every user, agent and tenant.

Cloudflare D1

Cloudflare's managed serverless database with SQLite semantics, created and queried from Workers and Pages projects.

TiDB Cloud Starter

MySQL-compatible distributed SQL that runs serverless and adds vector retrieval for AI agent workloads.

Upstash

A serverless data platform whose line-up includes Redis, Vector and Search alongside a handful of other data services.

Amazon DynamoDB

AWS's fully managed key-value and NoSQL database, built for single-digit millisecond performance at any scale.

What scaling to zero does to your first request

Scaling down when idle is how these services keep small projects cheap, and it comes with a question you need to answer for your own app: what happens to the first request after a quiet spell? For a nightly job or an internal tool, a short wait doesn't matter. For a checkout page or a login screen, it might.

Here's a quick way to find out. Leave a test database idle for an hour, then time the first query from your real hosting region, and then time the tenth. If the gap bothers you, look for a setting that keeps a minimum amount of compute awake, and work out what that does to the bill.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

Location matters in the same way. A database far from your app server adds a delay to every query, serverless or not. Find out which regions each service runs in, and if your app runs on an edge platform, check where the database lives relative to the code calling it.

Branching changes how you ship

Branching is the feature I'd weigh most heavily after the data model. On the Postgres side, Neon and Xata both offer it, and Xata describes itself as branch-native, with instant database clones created through an API.

Here's the test I'd run. Load a database with a realistic amount of data, create a branch, and time how long it takes before you can query it. Run your next migration on the branch, point a preview copy of the app at it, and delete the branch when you're done. Then open the usage page and see what that branch added to storage and compute.

Ask each vendor whether a branch is a full copy of the data or shares storage with its parent until something changes. If it's a full copy, every branch of a large database adds its whole size to your storage; if it's shared, you pay mainly for what the branch changes. That one answer decides whether a branch per pull request is cheap or a line item you'll notice.

Picking by the shape of your data

Relational apps with users, orders, invoices and reports want SQL, and Postgres is the one I'd default to. If you already depend on an ORM, a Postgres tied into it saves setup. A multi-tenant B2B product is worth a look at a Postgres built around tenants, because isolating customers yourself is fiddly work that's easy to get slightly off.

A product where every user, agent or workspace gets its own database leans towards SQLite-based services. Cloudflare D1, for instance, includes a very large number of databases per account on its paid Workers plan, which only makes sense if you plan to have lots of small ones.

Lookups by key, counters, sessions and caches don't need a relational engine at all, and a key-value store is built for exactly that access pattern. For semantic search over embeddings, a dedicated store from the list of vector databases may suit better than bolting vectors onto a general one.

Do you make serverless databases? Tool makers can ask to be considered for a featured place on this list.

The meters behind the bill

Serverless pricing is metered, and each service meters something different. One service counts compute hours per project, another charges by the hour plus storage by the gigabyte, D1 counts rows read beyond the included amount, and Upstash counts commands. Others sell a flat monthly plan with usage limits inside it.

That makes like-for-like comparisons hard. Before you choose, estimate three numbers for your app: how many hours a day it's busy, how many reads and writes a busy hour brings, and how much data you'll store after a year. Then run them through each pricing page. A free plan is lovely for a prototype. The slip I'd watch for is that prototype quietly becoming the production database, still on free-plan limits for projects, compute and storage, with no export ever tested.

If you'd rather keep a database on your own hardware and pay nothing in fees, the round-up of free database software covers that route.

Who's joining whom

This corner of the market is consolidating. Turso's homepage says it's joining Supabase, and Xata's says it's joining ClickHouse. Read the vendor's own notes on what that means for you, and keep a tested export of your data whichever service you choose.

Loading a slice of real data into your two favourites

Pick your two most likely candidates. Create a database on each, load a realistic slice of data, and point a copy of your app at it. Time cold and warm queries, make a branch if the service offers one, run a migration on it, and then delete everything and see what the usage page says you spent. You'll learn more from that evening than from a week of reading comparison posts.

Want your tool on this list? Featured spots and reviews here are paid partnerships. Here's how to partner with me.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.