Scale to zero compute
Traditional databases charge for provisioned compute 24/7, whether queries are running or not.
Xata flips this model.
Every Postgres branch scales its compute to zero when idle, and automatically wakes up on the next connection in less than one second. You only pay when work is actually happening.
How scale-to-zero works
Each Xata branch follows a simple lifecycle. This is what makes running thousands of databases practical.
Instant branch created
A full Postgres instance starts with copy-on-write storage. It's immediately ready to serve queries, with its own compute, connection string, and full isolation.
No active connections, compute stops
After a configurable idle period with no active connections, compute shuts down automatically. Data is preserved, only compute disappears.
Idle at $0 compute
The branch exists as storage only. No compute is running, so there is no compute cost. You only pay for storage if there are changes.
Instant wake-up on connection
A new connection automatically triggers compute to restart. The branch resumes instantly from persisted storage with all data intact.
The economics of scale-to-zero
Traditional databases charge for provisioned compute 24/7. Xata flips this model.
Pay only for active branches
Most branches sit idle 95%+ of the time. Scale-to-zero means you pay for the 5% that matters. A branch that runs tests for 3 minutes then sits idle for the rest of the day costs 3 minutes of compute, not 24 hours.
Thousands of branches
Run thousands of branches concurrently. Only a handful are active at any moment. The rest sit idle at zero compute cost, and wake up only when needed.
Storage scales with changes
Branches share the source database's storage via copy-on-write. You pay for the base storage plus deltas, typically 60-90% less than full copies.
Where scale-to-zero matters most
From AI agents to CI pipelines, scale-to-zero makes isolated databases economical at any scale.
Agent sandboxes
AI agents get isolated databases for each execution. Branches spin up, agents run their queries and mutations, then scale to zero. When the next run starts, the database wakes up automatically.
Per-engineer development
Every engineer gets their own branch. Most sit idle between coding sessions. Compute runs only during active development. No shared state, no conflicts, no cost for the 90% of the day the branch is not in use.
CI/CD preview environments
Create a database per pull request. Tests run, the branch goes idle, and the next push wakes it up again. When the PR closes, the branch is removed. You pay for minutes of compute per run, not hours of provisioned capacity.
Cost vs. traditional databases
Consider a typical CI workflow with 100 pull requests per day, where the main database contains 1TB of data.
- Per database compute
- 24 hrs
- Per database storage
- 1 TB
- Total compute
- 100 × 24 = 2,400 hours
- Total storage
- 100 × 1 TB = 100 TB
- Per database compute
- ~ 3 min
- Per database storage
- 30 GB
- Total compute
- 100 × 3 min = 5 hours
- Total storage
- 1 TB + (100 × 30 GB) = 4 TB
Postgres for agent scale.
Use your existing Postgres. Run it better with Xata.