Guarantees and limits
What a deployment promises, what it does not, its timing bounds, and how it is tested.
These are the promises a deployment makes to the applications on it, as long as it runs on what Requirements lists. What an application sees of them is in Guarantees.
Promises
- An acknowledged write is durable. A write is acknowledged only after its PostgreSQL transaction committed, on a store whose settings keep committed writes (a process refuses to start on one that does not). It survives what the store survives: with a synchronous standby, the loss of the primary.
- A retry is answered, not applied twice. A write is identified by its transaction id. Sent again within the retry horizon, 30 days, it is answered with the outcome recorded the first time, whichever process receives it and whatever failed in between.
- One writer per partition. One process at a time holds a partition's lease. Taking a lease over raises its epoch in the store, so a process that lost a partition (paused, cut off) can never commit to it again, even if it keeps running.
- Revocation takes effect within a bound. A revoked key, a removed grant
or a disabled user stops authorizing anything within
access_max_staleness_ms(10 seconds by default): a process whose view of access data is older stops serving until it catches up. - Committed state only. Reads, acknowledgements and subscription events are of committed state; presence is the one stream that is not.
- No content in observations. Logs, metrics, status and usage carry no document content, request body, credential or key secret, and no client's address. Log lines name a document by a keyed hash, never by its id (see Observability).
- Nothing outside on the data path. A deployment decides everything from its own stores. Nothing else (no manager, no billing service) is consulted to serve a request.
What is not promised
- Availability without the store. A store that does not answer stops its partitions; without its home, no process is ready.
- Durability beyond PostgreSQL's. Promoting an asynchronous standby, or recovering a store to an earlier point, loses what was committed after it, acknowledged or not. See PostgreSQL stores.
- Writes after the last backup, when a store is lost for good and its databases are restored from their backups.
- Isolation between tenants on shared processes. Processes keep databases apart by identity, admission and checks, not by hardware. A tenant that needs a hard boundary gets a store or a deployment of its own.
- Exact concurrency limits across processes. Rate limits bind all the
processes together, but concurrency and memory limits bind in each one:
a database limited to
Lconnections can hold up ton × Lacrossnprocesses. See Limits. - Point-in-time restores of a database. A restore is to one of its backups, not to any moment between them.
Timing
| What | Bound |
|---|---|
| A lost process's partitions can be taken over | After its lease lapses: 5 s by default (lease-ttl) |
| A revocation reaches every process | 10 s by default (access_max_staleness_ms) |
| A capability's lifetime | At most 24 hours |
| A stopping process hands its partitions over | Within 20 s, or it exits anyway (drain-timeout) |
A lost process stays listed as process_unseen | A day |
| Outcomes of past writes are kept | 30 days |
Measured performance
These pages publish no throughput or latency figures. Measure your workload on your hardware and your PostgreSQL before you size a production deployment, and keep the figures with the configuration they were measured on.
What is tested
The server's tests run against real PostgreSQL clusters. Its fault suites
run real mimicd processes and kill, pause and cut them off while they
commit: random kill -9 under a mixed load followed by an audit of the
stores against what clients were told, failover of a store's primary to a
synchronous standby under load, paused lease holders, network partitions
and an import killed mid-way. The document core it links is the one the
TypeScript packages are checked against, by a shared conformance corpus.
The specifications under docs/engine state each component's rules and
the checks it must pass; see Reference documents.