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.

1

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.

2

No active connections, compute stops

After a configurable idle period with no active connections, compute shuts down automatically. Data is preserved, only compute disappears.

3

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.

4

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.

Example

Cost vs. traditional databases

Consider a typical CI workflow with 100 pull requests per day, where the main database contains 1TB of data.

Traditional Database
Per database compute
24 hrs
Per database storage
1 TB
Total compute
100 × 24 = 2,400 hours
Total storage
100 × 1 TB = 100 TB
With Copy-on-Write & Scale-to-Zero
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
Storage0.0% less
100 TB
30 GB
Compute0.0% less
2,400 hrs
5 hours

Postgres for agent scale.

Use your existing Postgres. Run it better with Xata.