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 scaling

Source docs/ops/capacity-scaling.md

On this page
  1. Gateway replicas
  2. Memory of a gateway replica
  3. Volumes
  4. Cluster nodes
  5. Between tiers

Sizing: capacity.md. Alerts that lead here: ObspIngestLatency, ObspGatewayMemoryHigh, ObspGatewayAtMaxReplicas, ObspVolumeFilling.

Gateway replicas

The autoscaler adds gateway replicas on CPU (60% target, two at a time, a minute apart). Before relying on it, know what OPS-GAP-01 does to a scale-up: a new replica has no key records and no idempotency records, and the ingress’s hash on client address moves some nodes to it, whose events are refused (OBS-SIG-0003) until each node sends its key record again. In staging this is the behaviour to test; in production the autoscaler never scales down, so a node moves at most once per scale-up.

To raise the ceiling: change services.gateway.autoscale.max (and replicas for the floor) in the environment file, render, review, apply. Each replica needs 4 vCPU and its memory limit free on some node, and a new volume.

Scaling down a gateway (staging only, until OPS-GAP-01 is closed): the highest ordinals go first and their volumes are kept; their records stay in the backups and on the kept volumes but are no longer served. Do not delete those claims.

Memory of a gateway replica

The reference gateway holds its whole store in memory. When ObspGatewayMemoryHigh fires there is no setting that frees memory; the options are a larger limit (edit resources.memory and memoryLimit, render, apply; the pod restarts and replays its store) or moving new nodes to new replicas. This is the first thing to fix before production (OD-12).

Volumes

ObspVolumeFilling (below 15% free): grow the claim if the storage class allows expansion (kubectl -n <ns> patch pvc store-obsp-gateway-0 -p '{"spec":{"resources":{"requests":{"storage":"3Ti"}}}}'), then change services.<name>.storage in the environment file so new replicas get the same size (a StatefulSet’s claim template cannot be changed in place: render, then kubectl delete statefulset obsp-gateway --cascade=orphan and apply again, which keeps pods and volumes). Never delete records to make room; retention is an owner decision (OD-11).

Cluster nodes

Add nodes through the platform (Terraform node_pools, or the provider’s own tooling under the owner’s account); the platform-contract module checks that the pools give the vCPU the gateway tier needs (gateway_vcpu_required). Drain nodes one at a time: the PodDisruptionBudgets keep one gateway replica of two or more serving, and allow a single-replica service (registry, log, runner) to be moved, which is a short outage of that service: schedule it.

Between tiers

Moving from 10^5 to 10^6 events per second is not a scaling step with the reference gateway: it needs the store of OD-12 first, and then about ten times the nodes, ingress bandwidth of about 11 Gbit/s, and storage growth of about 121 TB a day (capacity.md). Plan it as a project with its own load test in staging.