Skip to content

Serverless databases, priced like a subscription

Standard-class databases on Layerbase Cloud stop running when nothing is connected to them and start again on the next connection, usually in one to five seconds; the handful of engines that are better off awake run always-on instead. 18 engines, one account, and a monthly price that does not move with your traffic.

Free is $0 with no credit card: 2 databases, 5 GB, no expiry date.

What serverless actually means for a database

The word is doing two jobs at once. One is a runtime behavior. The other is a billing model. Almost everyone sells them as a single package.

Nothing to size

You do not choose an instance class, a CPU count, or a storage volume before you have written a query. You pick an engine and get a connection string back.

Scales to zero

After 60 minutes without a connection on Free, or 6 hours on a paid plan, the database hibernates. The container stops. Nothing is running on your behalf.

Wakes on connect

The next connection starts it again, usually in one to five seconds. There is no wake button, no resume endpoint to call first, and no change to your client code.

Idle changes nothing

The bill is the plan price whether the database served traffic all month or slept through most of it. Sleeping is how we hold the price flat, not a thing you pay to avoid.

The first three of those are what people mean when they say a database is serverless, and most vendors deliver them well. The fourth is where the category splits. If compute genuinely scales to zero, metering it is a defensible way for a vendor to get paid for the work you actually caused. The cost is that you can no longer answer “what is next month” without predicting your own traffic first.

The bill is a formula and you are the variable

Compute units, ACU-hours, rows read, commands, GB-seconds. Every one of those measures real work. Put four of them on one invoice and the price of your database becomes an estimate.

PlatformHow the bill is computedFree tier
NeonUsage-metered with no minimum: $0.106 to $0.222 per compute-hour, $0.35 per GB-month of storage, $0.10 per GB of egress100 CU-hours and 0.5 GB per project per month; compute suspends
SupabaseFlat base ($25 Pro, $599 Team) plus metered compute, storage, egress, and monthly active users. Branch compute is not covered by the spend cap500 MB; projects paused after one week of inactivity
PlanetScaleFlat monthly per cluster size, plus storage, backups, egress, and replicas on topNone. Hobby was retired in 2024; the entry point is $5/mo
TursoFlat tier plus per-row overages: reads billed past the included quota, from $0.75 to $1.00 per billion5 GB; databases archived after 10 days of inactivity
UpstashPer-command: $0.2 per 100K commands plus $0.25 per GB of storage, or fixed plans from $10 to $1,500/mo256 MB; free databases archived after a minimum of 30 days idle
RailwayPure usage metering, billed per second on memory, vCPU, volume, and egress. The $5 and $20 plans are credit-bearing floors, not caps$0 plan carrying $1/mo of usage credit
LayerbaseFlat monthly. Free $0, Solo $5, Pro $15. No meter on compute, queries, connections, rows, or egress$0 for 2 databases and 5 GB, no card

Billing models as published on each vendor's own pricing or documentation pages, checked July 2026. They change, so re-check before you plan a budget around one.

What metering is good at

A meter is the fairest structure for a workload that is genuinely spiky and idle most of the time. If you run one Postgres that serves a few thousand queries a week, a usage-metered vendor will charge you less than we do, and that is a real reason to use one.

What we do instead

The same scale-to-zero behavior, at one of three prices. Sleeping databases cost us almost nothing to keep, which is what makes a flat number possible in the first place. Going over a fair-use allowance never produces a charge; the consequences are written down in the acceptable use policy.

Hibernation, then wake on connect

Scale-to-zero is literal here: an idle database's container is stopped. The data directory stays where it was and the hostname stays reserved, so the next connection restarts the container and completes its handshake against a running engine. Most engines are answering queries again in one to five seconds.

All of that happens under the engine's own protocol. psql, mysql, redis-cli, and whatever ORM you already use connect to a hibernated database exactly the way they connect to a running one. There is no Layerbase driver to install and no connection wrapper to route through.

The full idle path

  1. Running. Normal operation, connections open.
  2. Hibernated. 60 minutes idle on Free, 6 hours on paid. Container stopped, address kept.
  3. Awake. A connection arrives and the engine is back, typically within one to five seconds.
  4. Archived. Free tier only, after 14 idle days. Explicit Restore brings it back; the most recent backup is always kept.

Edge runtimes query over HTTPS

A runtime that cannot open a raw TCP socket can send queries over HTTPS instead. The HTTP query API reaches 17 of the 18 cloud engines. TigerBeetle is the exception: it speaks its own binary protocol and is not reachable that way.

Serverless and edge docs

Postgres connects over pooled TCP

There is no HTTP driver for Postgres here. From a Lambda, a Vercel function, or any other serverless runtime, you connect with the ordinary Postgres driver and a pooler absorbs the connection churn that short-lived functions produce.

Managed PostgreSQL

Some engines are better off awake

ClickHouse, QuestDB, InfluxDB, Qdrant, and Weaviate run always-on rather than scaling to zero, because warming them costs minutes rather than seconds. On paid plans they draw from your always-on pool, TigerBeetle reserves a dedicated block of its own, and you can pin any other database always-on the same way.

How the always-on pool works

Long idle has one more step, on Free only

Paid databases are never auto-archived. A free database that has slept for 14 days is archived: its listener and DNS are released, and bringing it back takes an explicit Restore click rather than a connection. The data is kept, and so is the most recent backup.

Database lifecycle

18 engines, one account

Scale-to-zero is not a Postgres feature here. The cache, the search index, the document store, and the SQLite file all follow the same hibernate-and-wake behavior, and the analytics and vector engines that are better off awake run always-on from your pool, on the same bill.

Three more engines run on the desktop and CLI but not in the cloud, where licensing keeps them uncreatable. FerretDB covers the MongoDB wire protocol on Cloud.

Serverless database questions

Is Layerbase serverless?

Yes, in the sense that changes how you work: there is no server to size, provision, or patch, idle Standard-class databases scale to zero, and the next connection wakes them in about one to five seconds. It is not serverless in the billing sense, which is deliberate. No compute units, no request counts, no per-row charges. Free is $0, Solo is $5 a month, Pro is $15 a month.

What happens when my database sleeps?

The container stops. Your data stays on disk, the connection string keeps working, and the address stays reserved. The next connection restarts the engine, usually in one to five seconds, so the client sees a slow first connection rather than an error. Free databases sleep after 60 minutes idle and paid databases after 6 hours; anything pinned to your always-on pool does not sleep at all.

Does the free tier expire?

No. There is no 30-day countdown and no deletion date. Free is $0 with no card for 2 databases and 5 GB. What does happen is quieter: a database sleeps after an hour idle, and after 14 idle days it archives, which releases its address until you click Restore. The data stays, and so does the most recent backup.

See what Free includes
How is this different from Neon or PlanetScale?

Neon is Postgres, with better Postgres branching than ours and a usage-metered bill that can be genuinely cheap for one large, mostly idle database. PlanetScale has no free plan and starts at $5 a month per cluster with storage, backups, and egress billed on top. The difference here is shape rather than quality: 18 engines under one account, and a price that is a number instead of a formula.

Find your migration path

Start on the free tier and leave it running

2 databases, 5 GB, no card. They go to sleep when you stop using them and wake up when you come back, and the price stays at $0 either way.