003 One process per database
Summary: why secrets runs one server process per database and leaves high availability to the database and the operator.
Key terms: SQLite, PostgreSQL, writer connection, rate limit, audit buffer, high availability.
Related: Operation · Spec §1
Date: 2026-11-23. State: in force.
Decided
- One
secrets-serverprocess serves one database. The target is a small VM (1 vCPU, 1 GB RAM) for hundreds of users. - SQLite is the default, with one writer connection that serializes log appends. PostgreSQL is supported for deployments that already run it.
- The write rate limit and the buffer of read audit events live in the process’s memory.
Why
- A secrets server has little traffic: a deploy or a CI job reads one environment in one request.
- One process keeps the server small and its failure modes few. Backups of one SQLite file are simple.
- Clients detect a server that lies or rolls back; availability is the only property that a second process would add.
Refused
| Refused | Reason |
|---|---|
| Several server processes on one database | The in-memory limits and audit buffer would need shared state |
| Federation between servers | Out of scope for v1: an account and its devices belong to one server |
Not now
| Not now | What can change it |
|---|---|
| High availability in the server | A deployment that cannot accept a restart; PostgreSQL can already be made highly available on its own |