Choose what this site may use

This site uses strictly necessary cookies to work and to remember your privacy choices. With your permission it would also load content hosted by other services, such as videos, maps and fonts, which then receive your network address and device data. We do not sell or share your personal information and we run no advertising. Choose Accept all, Reject all or Customise. You can change your mind at any time through Privacy choices at the foot of every page.

  • Always on

    Needed for the site to work and to remember your privacy choices. Always on.

  • Remembers settings you choose, such as the light or dark display, in your browser.

  • Loads videos, maps and other content hosted by other services. Those services receive your address and device data.

Menu Close
In this section: Learn
Start
Guides
Domain packs
Participants
Security and privacy
Pilot kits
Operations
Ecosystem

Capacity plan

Source docs/ops/capacity.md

On this page
  1. Planning figure per gateway replica
  2. Tiers
  3. What stops these tiers today
  4. Other services
  5. Environments

Derived from the one measurement the repository has: the reference gateway bench in reference/rust/README.md, taken on a shared 4-thread virtual machine with other jobs running. It is indicative only. Every figure below beyond one machine is arithmetic, not measurement, and none of it is a capacity claim.

Newer measurement (data plane). The load harness obsp-load (results) measured 38 000 to 41 000 events per second on the in-memory store and 17 000 to 19 000 on PostgreSQL. It ran on the same class of machine, after the profiling changes, with the harness, replicas and database all sharing 4 threads. Per event it measured about 108 µs of gateway CPU and 86 µs of PostgreSQL CPU. The stateless gateway-dp replicas (dataplane) replace the per-replica stores this plan was written for. The tiers below still use the older bench figures.

Planning figure per gateway replica

Bench row (4 threads) Events per second
In-memory store, 1 client 11 100 to 11 300
In-memory store, 4 clients / 8 clients 17 400 to 18 100 / 18 400 to 25 800
File store synced on every write, 4 clients 10 900 to 15 700
File store synced every 64 writes, 4 and 8 clients 13 500 to 19 200
  • Ceiling per replica: 10 000 events per second on 4 dedicated vCPU, with the store synced on every write (the lower bound of that row, rounded down). Production keeps --fsync-every 1: syncing less often loses up to n - 1 answered writes on power loss, which is an owner decision (OD-09).
  • Steady state: 6 000 events per second per replica, so the autoscaler’s CPU target (60%) leaves room for a burst and for one replica’s share when another restarts.
  • Replicas = ceil(rate / 6 000) + 1 (one spare).
  • Each event is about 1.4 kB (the bench’s observation records with an Ed25519 envelope), batches of 64.

Tiers

Sustained rate Gateway replicas (4 vCPU) Gateway vCPU Gateway memory (16 GiB each) Payload in Payload stored per day
10^5 events/s 18 72 288 GiB 140 MB/s, about 1.1 Gbit/s about 12 TB
10^6 events/s 168 672 2 688 GiB 1.4 GB/s, about 11 Gbit/s about 121 TB
10^7 events/s 1 668 6 672 26 688 GiB 14 GB/s, about 112 Gbit/s about 1.2 PB

Transport overhead (HTTP, TLS) and replication of the stores come on top. Per replica at the steady state the store grows by about 8.4 MB/s, about 726 GB per day.

What stops these tiers today

  1. Memory (OPS-GAP-01). The reference gateway keeps every accepted record in memory as well as in its file. At 6 000 events per second a replica fills a 16 GiB limit in about 34 minutes. The reference gateway therefore cannot hold any tier above for more than minutes; a store that keeps records on disk only, with a bounded index, is the precondition for every tier. Until then the production values are a sizing of the target, not a working setting.
  2. No shared state between replicas (OPS-GAP-01). Idempotency records and node key records live in the replica that received them. A node must reach the same replica every time (hash on client address at the ingress), a scale-up moves some nodes to a replica without their key records (their events are refused until the key record is sent again), and a scale-down would strand a replica’s store, so the production autoscaler never scales down.
  3. Disk. A 2 TiB volume per replica holds about three days at the steady state. Retention, compaction and archival to object storage are not designed yet; the production volume size is a placeholder for that decision.
  4. 10^7 events per second. About 6 700 vCPU for signature checks alone. The bench notes that the per-event cost (one strict Ed25519 verification per observation) dominates; one signature over a batch would cut it, but that is a protocol change (a proposal under oips/), not a deployment setting.
  5. Per-node target. The master plan’s design target of at least 100 000 observations per second per node is missed by a factor of 4 to 5 on the bench machine; the tiers above reach their rates with many replicas, not with faster ones.

Other services

Service Load model Sizing
Registry, log writes per registration, claim and report (low rate); reads cacheable one replica; 1 to 2 vCPU; volume grows with claims and reports
Conformance runner one run at a time per request; live runs bounded by the allow-list one replica; 2 vCPU; scale by running more runners behind the ingress
Static web sites (network, services, verifier) static files; hashed assets cached a year at the CDN or browser; the verifier’s checks run in the visitor’s browser from a CDN: no server; in the cluster: two replicas per release of 100 to 500 millicores, the previous release kept at one
Evidence verifier on demand 2 to 4 vCPU per run

Environments

Environment Gateway Purpose
dev 1 replica, 0.5 to 2 vCPU, 2 GiB, 10 GiB volume functional checks, federation and node agent included
staging 2 to 4 replicas of 4 vCPU and 8 GiB, autoscaled both ways, 200 GiB each load tests up to about 24 000 events per second; exercises scaling and node affinity
production 4 to 18 replicas of 4 vCPU and 16 GiB, scale-up only, 2 TiB each the 10^5 tier, once OPS-GAP-01 is closed
sovereign 1 replica of 4 vCPU and 8 GiB, 500 GiB one site, offline, up to about 6 000 events per second

Scaling procedure: capacity-scaling.md.