Agent workloads outgrow Postgres.
Rivet is built for durable, multiplayer agent workloads, with high write throughput and large amounts of data.
Choose Rivet for
- Yes: Durable agents
- Yes: Multiplayer agents
- Yes: Thousands of concurrent agents
- Yes: Agent transcripts and filesystems
- Yes: Per-tenant databases
Choose Postgres for
- Yes: Users, billing and permissions
- Yes: Queries across your whole app
- Yes: Light, occasional writes
Use both if
- Yes: You have an app and agents
- Yes: App data stays in Postgres
- Yes: Agent data moves to Rivet
Every Rivet database is ACID-compliant SQL, so Rivet can replace Postgres entirely too.
Add durable agents next to your Postgres app
Paste the prompt into your coding agent, or follow the AI agent guide.
Why Postgres struggles with agent data
Agents write orders of magnitude more data than apps: each concurrent agent keeps about 4 GB a month.1
On Postgres
On Rivet
Why Postgres struggles with running and scaling agents
Agents need to be durable and multiplayer: they run for hours, take messages mid-run and stream to many viewers.
On Postgres
On Rivet
- No: Two requests can hit one agent at onceWithout locks, races corrupt its stateYes: One Actor owns each agent’s stateWrites can’t collide
- No: Every user in one shared databaseWithout row-level security, one missing WHERE leaks dataYes: Hard isolation, a database per agentNo query can reach another agent
- No: LISTEN/NOTIFY doesn’t scale for multiplayer agents8 KB messages, and notifying commits run one at a timeYes: Realtime and multiplayer built inEvery viewer sees the agent live
- No: A crash mid-run loses the agent’s progressYou build checkpoints and retriesYes: Agents survive crashesThey pick up where they left off
- No: Each viewer on LISTEN holds a connection45,000 by default, so multiplayer needs a separate serviceYes: Multiplayer scales out horizontallyViewers connect to the agent
Rivet vs Postgres for agent workloads
| Feature | ||
|---|---|---|
| Disk | Partly: Resized as it fills2Never shrinks, 64 TiB max | Yes: BottomlessNothing to resize |
| Scaling | Partly: Bigger instanceVertical resize, with a failover | Yes: Add nodesHorizontal, with any autoscaler |
| Reads and writes | Yes: SSD speedOver the network | Yes: SSD speed for hot dataCold data on S3 |
| SQL | Yes: One shared database | Yes: Full SQL per agentSQLite: joins, indexes, transactions |
| Isolation | Partly: Shared databaseIsolated by your WHERE clauses | Yes: Database per agentIsolated by structure |
| Multiplayer | No: LISTEN/NOTIFYOr add WebSockets and pub/sub | Yes: Built inEvents to every client |
| Durable agents | No: Build it or add a libraryWorkers, queues and retries | Yes: Built inSurvives crashes, sleeps when idle |
| ACID transactions | Same on bothEvery write is atomic and durable | |
| ORMs | Same on bothDrizzle, or plain SQL | |
| Open source | Same on bothApache 2.0 and the PostgreSQL License | |
| Managed cloud | Same on bothRivet Cloud, or RDS, Neon, Supabase and others | |
| Bring your own cloud | Same on bothRuns in your VPC, managed for you | |
| Self-hosting | Same on bothYour cloud, on-prem or air-gapped | |
How we estimated
Measured on a real agent, then scaled to 1,000 concurrent agents. Postgres is Amazon RDS for PostgreSQL in us-east-1, Multi-AZ with one standby, at list prices.
1An active agent
We ran a real Pi Durable coding agent in a Rivet Actor: 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, in about 2 transactions a second: about 11 MB an hour. About 5.7 MB an hour stays in its database, 75 to 80% of it the transcript. Idle, it writes nothing.
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
RDS: gp3 storage on Multi-AZ costs $0.23 per GB-month, and allocated storage can’t shrink. Each month 1,000 concurrent agents add 4,104 GB × $0.23 ≈ $944 to the bill, for good.
After six months that’s 24.6 TB, or $5,664 a month. One instance holds 64 TiB at most, so past about 17 months you also split across instances.
The chart compares RDS storage with S3 for data Rivet has moved there; recent data stays on replicated SSD. S3 Standard is $0.023 per GB-month for the first 50 TB (51,200 GB), so six months in it’s 24,624 GB × $0.023 ≈ $566 a month.
Over six months: RDS adds up to $944 × (1 + 2 + … + 6) ≈ $19,822. S3 adds up to $94 × 21 ≈ $1,982.
3Write throughput
DBOS measured 144,000 single-row writes a second on one RDS db.m7i.24xlarge (96 vCPUs, 120,000 provisioned IOPS), limited by Postgres’s single write-ahead log.
144,000 ÷ 6 row writes a second per active agent (measured above) ≈ 24,000 concurrent agents. That’s the best case: tiny single-row transactions on the largest instance. Bigger rows and smaller instances lower it.
4Connections
RDS for PostgreSQL sets max_connections to LEAST(instance memory ÷ 9.5 MB, 5,000): about 400 on a 4 GiB instance, and 5,000 at most by default. A custom parameter group can raise it, which AWS advises against.
Each connection is its own server process. A viewer that LISTENs on Postgres for an agent’s updates keeps one open.
PgBouncer’s transaction pooling shares connections, but doesn’t support LISTEN or session-level advisory locks.
Sources, read November 14, 2026
- AWS: RDS for PostgreSQL pricing
- AWS: S3 pricing
- AWS: RDS storage limits
- DBOS: benchmarking Postgres writes on RDS
- Rivet 3.0
- Rivet: zero-disk storage for SQLite
- AWS: RDS connection limits
- PgBouncer: pooling modes
- Recall.ai: LISTEN/NOTIFY doesn’t scale
- PostgreSQL: NOTIFY lock (async.c)
- PostgreSQL: row-level security
- PostgreSQL: explicit locking
- PostgreSQL License
- Rivet: bring your own cloud
- Rivet: SQLite with Drizzle
Keep Postgres for your app. Put your agents on Rivet.
Durable, multiplayer agents, each with its own SQLite database on S3.