Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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-server process 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

RefusedReason
Several server processes on one databaseThe in-memory limits and audit buffer would need shared state
Federation between serversOut of scope for v1: an account and its devices belong to one server

Not now

Not nowWhat can change it
High availability in the serverA deployment that cannot accept a restart; PostgreSQL can already be made highly available on its own