SQLite databases without the limits.
Each Rivet Actor has its own SQLite database inside it, with no 10 GB cap and realtime built in, on any cloud.
Choose Rivet for
- Yes: A SQLite database per tenant
- Yes: Tenants that outgrow 10 GB
- Yes: Older data at S3 prices
- Yes: Realtime updates to clients
- Yes: Any cloud, your VPC or on-prem
- Yes: Open source, control plane included
Choose D1 for
- Yes: Apps already on Cloudflare Workers
- Yes: Prototypes on the Workers Free plan
- Yes: Per-row billing that scales to zero
Both give each tenant its own SQLite, so each D1 database maps to one Rivet Actor.
Move a D1 database to a Rivet Actor
Paste the prompt into your coding agent, or follow the quickstart.
Migrating off Cloudflare? Run your Workers and D1 databases anywhere with OpenOrange.
Why D1 is expensive
D1 storage costs about 3× as much as Postgres on RDS, and about 33× as much as S3, where Rivet keeps older data.
On D1
On Rivet
- No: $0.75 per GB-month of storage2The bill grows $3,078 every month for 1K concurrent agentsYes: Older data moves to S3~33× cheaper for older data
- No: Every row read and written is billed4$1.00 per million writes past 50 million a month; each index adds a rowYes: No charge per rowRivet Cloud bills raw hardware and storage
- No: $0.10 a month per database past 100,000Even when it’s emptyYes: Idle Actors cost only storageThey sleep, so millions of tenants stay cheap
Storage cost
D1 against S3 Standard, for data Rivet has moved to S3; recent data stays on replicated SSD. Storage only, with no charges for rows.
Storage price
33× cheaper
D1$0.75/GB-mo
Rivet$0.023/GB-mo
Six months of storage for 1K concurrent agents
33× cheaper
D1$64,616
Rivet$1,982
Why every D1 query is a network call
A D1 database is a separate service from your Worker, so every query crosses the network.
On D1
On Rivet
- No: No latency guarantee to your codeLocation hints aren’t guaranteed; D1 runs where Cloudflare places itYes: Runs in the datacenter you chooseNext to your servers and database, so latency stays low and steady
- No: Each query commits on its ownOnly a batch() is atomic, with no code between its statementsYes: Transactions around your own codeRead, decide and write as one atomic unit
- No: No support for realtime workloadsNo way to push changes to clientsYes: Events and WebSockets built inPush each change to connected clients as it’s written
Why D1 is full of limits
D1 is built for many small databases, and each one has a ceiling.
On D1
On Rivet
- No: 10 GB per database, and it can’t be raisedThen you delete rows or shard the tenantYes: No fixed storage limitOlder data moves to S3, so tenants keep growing
- No: 1 TB of storage per accountMore only on requestYes: Self-hosted, you set the capacityOlder data goes to your own S3 bucket
- No: One query at a time per databaseWrites take several ms; a full queue returns overloaded errorsYes: 790 durable writes per second on one ActorSequential, in our open benchmark, so busy tenants keep up
Why D1 locks you in
D1 runs only on Cloudflare, behind the Workers runtime.
On D1
On Rivet
- No: Storage and control plane are proprietaryOnly workerd is open source; its D1 module is experimentalYes: Open source, control plane includedApache 2.0: run the whole stack in production
- No: Runs only on CloudflareQueried from Workers or Cloudflare’s REST APIYes: Runs on any cloud or on-premRivet Cloud, your VPC or your own servers
- No: Jurisdictions, but no network isolationData stays in a region, not in your VPCYes: Runs inside your VPCWith bring your own cloud or self-hosting
- No: Workers runtime onlynodejs_compat covers many npm packages, not native onesYes: Runs in your Node.js, Bun or Deno processNative packages work on Node.js
Rivet vs D1
| Feature | D1 | |
|---|---|---|
| Forking | No: Branching and cloning not yet offeredTime Travel restores overwrite in place | Yes: Fork an Actor in 20 msWith its SQLite, to branch a tenant or an agent |
| Schema migrations | Partly: wrangler d1 migrations applyOne database per command | Yes: Each Actor migrates itselfAtomically on start, so no per-tenant scripts |
| Point-in-time recovery | Same on bothBuilt in, one database at a time | |
| SQL | Same on bothSQLite, with Drizzle or plain SQL | |
| Managed cloud | Same on bothRivet Cloud, or Cloudflare | |
How we estimated
Measured on a real agent, then scaled to 1,000 concurrent agents, each with its own D1 database. Prices are list prices: D1 on Workers Paid, and Amazon RDS for PostgreSQL and S3 Standard in us-east-1.
1An active agent
We ran a real Pi Durable coding agent on Rivet: 15 sessions across five coding tasks, 28 minutes of non-stop work, with 267 model calls and 231 tool calls.
While working it wrote about 6 rows a second at about 480 bytes each: about 11 MB an hour. About 5.7 MB an hour stays in its database, 75 to 80% of it the transcript.
A concurrent agent is one agent working all the time: 5.7 MB × 24 hours × 30 days ≈ 4.1 GB kept a month. 1,000 concurrent agents keep about 4.1 TB a month.
2Storage cost
D1 storage costs $0.75 per GB-month past the 5 GB each account includes. Postgres on Amazon RDS, as on our Postgres page, is gp3 storage on Multi-AZ at $0.23 per GB-month, and S3 Standard is $0.023 per GB-month for the first 50 TB.
Per GB, D1 costs $0.75 ÷ $0.23 ≈ 3.3× RDS and $0.75 ÷ $0.023 ≈ 32.6× S3.
This compares storage only. It leaves out RDS instance hours, IOPS and backups, Workers requests and CPU, and D1’s charges for rows read and written.
Each month 1,000 concurrent agents add 4,104 GB × $0.75 ≈ $3,078 to the D1 bill. After six months that’s 24,624 GB, or (24,624 − 5) × $0.75 ≈ $18,464 a month.
The cards compare that with S3 for data Rivet has moved there; recent data stays on replicated SSD. Six months in, S3 is 24,624 GB × $0.023 ≈ $566 a month.
Over six months: D1 adds up to $64,616. S3 adds up to $1,982.
3D1 limits for this workload
Each D1 database holds 10 GB, so an agent fills one in 10 ÷ 4.1 ≈ 2.4 months. The estimate assumes each agent’s data spreads over new databases as it grows: 3 per agent after six months, or 3,000 in all, inside the 100,000 that Workers Paid includes, so no per-database fee is counted.
Workers Paid allows 1 TB of storage per account, which 1,000 concurrent agents pass in about 7 days. The estimate assumes Cloudflare raises the limit on request.
4Rows read and written, not counted
D1 also bills $1.00 per million rows written past 50 million a month, and $0.001 per million rows read past 25 billion. Each index on a written column adds another written row.
At the 6 row writes a second measured above, 1,000 concurrent agents write about 15.6 billion rows a month: roughly $15,502 a month in writes, before index rows and reads.
We leave rows out of the cards because a port’s row counts depend on its schema, indexes and queries. Rivet Cloud doesn’t charge per row.
Sources
- Cloudflare: D1 limits
- Cloudflare: D1 pricing
- Cloudflare: D1 Worker API
- Cloudflare: D1 import and export
- Cloudflare: D1 data location
- Cloudflare: D1 Time Travel
- Cloudflare: D1 migrations
- Cloudflare: D1 errors
- Cloudflare: D1 REST API
- Cloudflare: choose a storage product
- Cloudflare: Node.js compatibility
- Cloudflare: workerd
- Cloudflare: workerd config schema
- Drizzle: Cloudflare D1
- AWS: RDS for PostgreSQL pricing
- AWS: S3 pricing
- Rivet: Actors vs Postgres
- Rivet: introducing OpenOrange
- Rivet on GitHub
- Rivet: SQLite in Actors
- Rivet: SQLite with Drizzle
- Rivet: Actors vs Durable Objects benchmark
- Rivet: limits
- Rivet: zero-disk storage for SQLite
- Rivet: forking
- Rivet: introducing Actor forking
- Rivet: events
- Rivet: connections
- Rivet: deploy
- Rivet: bring your own cloud
- Rivet Cloud pricing
Facts as of November 18, 2026.
Keep SQLite per tenant. Run it anywhere.
Each Actor keeps its own SQLite, realtime and schedules, on Rivet Cloud or your own infrastructure.
Migrating off Cloudflare? Run your Workers and D1 databases anywhere with OpenOrange.