A database for each tenant
Run PostgreSQL-compatible queries beside your data on Cloudflare. Compute duration charges stop when the database can hibernate.
One tenant runs a query.
Another sleeps.
Each database gets its own Durable Object. In this example, a storefront counts its orders while a warehouse database hibernates.
Storefront
Running SQL| order_id | item |
|---|---|
| 1041 | Field notebook |
| 1042 | Pencil set |
| 1043 | Desk pad |
SELECT count(*) FROM orders;3The SQL engine counts three rows in the storefront’s local storage.
Warehouse
Hibernating| item | on_hand |
|---|---|
| Field notebook | 48 |
| Pencil set | 16 |
| Desk pad | 32 |
The warehouse keeps its committed stock counts in storage while compute sleeps.
Monthly estimate
What would one database cost to run for 30 days? Pick a workload to compare PostDurable and Neon Launch, then adjust it to fit your app.
Your workload
This adds up to 120 active hours and 1,500,000 queries in 30 days.
Estimated monthly cost USD
| Monthly costs | PostDurable | Neon Launch |
|---|---|---|
| Database activity | $1.82 | $3.45 |
| Stored data | $1.70 | $1.75 |
The PostDurable estimate is $1.68 lower for this workload.
PostDurable models active time, requests and rows processed. Neon Launch models a 0.25 CU compute with a five-minute autosuspend delay.
Invoice history with a window function
Build a running list of invoice amounts for each customer in SQL. Here’s what PostDurable returned in its PostgreSQL comparison tests.
SELECT cust,
jsonb_agg(amount) OVER (
PARTITION BY cust
ORDER BY id
)
FROM inv
ORDER BY id; | cust | jsonb_agg |
|---|---|
| acme | [100.50] |
| acme | [100.50, -20.25] |
| beta | [0.00] |
Join the early-access waitlist
We’ll email you if your database access is approved.