Skip to content

Scaling and deployment

Partial

Omniglass is one Go binary, a packaging decision rather than a ceiling. The same artifact runs a laptop demo and a fleet of thousands of systems; it grows by measured topology, and the figures that say when to grow are reported by the running server itself. To deploy it, see deployment.

The binary is a modular monolith: one codebase, modules behind clean seams (the Storage Gateway is the only path to the database, outposts talk to the server only over the bus). It runs two ways:

  • omniglass server: the API, the console (embedded in the binary, not a separate service), an embedded NATS server with JetStream, the ingest consumers, and the background loops (calc, rule reconcile, settlement, retention). It runs against a Postgres the install brings (storage).
  • omniglass outpost run: collection, at a site or centrally for cloud and SaaS sources. It connects out to the server’s bus and needs nothing inbound (outposts).

omniglass migrate applies the schema, and the server’s boot refuses a schema newer than it knows. A release ships as binaries for each platform, a multi-arch container image and a Helm chart.

Until embedded Postgres lands, the one-command way to run everything on a laptop is the lab: Postgres, the server and an outpost with a simulated fleet, as containers. It is a place to learn, not a deployment: its data is disposable and its sign-in well known.

Coordination: the bus moves, Postgres remembers

Section titled “Coordination: the bus moves, Postgres remembers”

Postgres is the system of record. NATS JetStream is how work moves: an outpost’s worklist and heartbeat ride request-reply on its own subjects, its telemetry rides the OG_TELEMETRY stream, and commands are queued to it. Postgres is never used as a message bus.

The ingest stream is consumed in lanes: each outpost’s batches are filed under a partition of its name, and each partition is a durable consumer with one batch in flight, so an outpost’s batches land in the order it sent them while the partitions land side by side (ADR-1896). There are four by default, OMNIGLASS_INGEST_PARTITIONS sets from 1 to 64, and each lane confines and persists inline.

What an outpost costs the server is set by how many transactions its telemetry makes, not by its sample count. An outpost publishes one batch a tick, a group per task (outposts), and the batch lands in one transaction under its receipt (ADR-0311). That transaction costs a fixed dozen or so statements, plus a term for each series the batch carries twice, each judged sample that fires a rule, each settled targeted property, and each conduit group carrying identified samples; with none of those, a batch of one group and a batch of fifty cost the same (storage).

Corporate at 1,000 systems, the busiest outpostTarget
Samples per batch40 or more
Statements per sampleabout 0.5
Batches a second, all outposts18 or fewer (one flush a second per outpost)
Receipts a dayunder 1.2 GiB (ADR-1699)
Ingest lag p99under 5 s

These are targets. omniglass lab measure prints the measured figures for a scale lab (batches, samples per batch, receipts a day, WAL bytes a sample, the ingest lag percentiles, redeliveries, and each lane’s busy fraction) (measuring a scale lab). A figure is always quoted with the scenario and size it was read at and compares only with the same: every measured lab level runs the corporate scenario, at 20, 300, 1,000 or 3,000 systems (which fleet each level measures).

A faster lane is a win only if it still lands everything, so the same run reads every telemetry kind’s loss ratio across the outpost hop and the ingest hop, (in - out) / in with 0 healthy, from the accounting each batch carries on its receipt (messaging). The perf gate fails a run with any loss above 0, naming the kind, the hop and the cause. The accounting packs into integer arrays on the receipt rather than new rows, and receipts are pruned at a day, so their size is a standing table of about 1 GiB a day at the rate above, about 1% of the metric table the same fleet writes.

Scale up or scale out: what the figures say

Section titled “Scale up or scale out: what the figures say”

A running server reports these on its own platform component every report window (messaging, workers), so the evidence is the fleet’s own history. Read them together:

  • A lane is the ceiling. ingest-lane-busy near 1, bus-consumer-pending growing window over window and ingest-lag-max climbing: the busiest lane is saturated. A bigger box helps only as far as it shortens each landing; past that, more partitions spread the outposts across more lanes.
  • The database or the process is the ceiling. db-pool-wait-count a nonzero share of db-pool-acquire-count with db-pool-acquired at db-pool-max, or process-cpu-seconds over the window near the server’s cores, while no lane is saturated: scale up (more cores, a larger pool, a faster database).
  • The database is out of connections. db-connection-count near db-connection-limit while the pool shows headroom: other clients hold the rest, so raise the limit or add a pooler. db-connection-idle-in-transaction-count above 0 with db-transaction-oldest-age climbing is a leaked transaction, a fault to find rather than capacity to buy.
  • The lag is not the server’s. ingest-lag high while the lanes are idle and the backlog near 0: samples arrive late (a spool replaying after an outage, a slow WAN) or the outpost’s clock is behind. The lag is commit time minus the sample’s timestamp, two clocks subtracted (ADR-1628).
  • A tick is the ceiling. calc-pending-depth growing while calc-pass-duration nears its interval, or outbox-due-age growing: that tick, not ingest, has fallen behind.

The seeded ingest-lag-high rule opens a warning alarm on the server’s component when ingest-lag-max holds over 30 seconds for 2 minutes.

An outpost’s size is the sum of what its tasks cost it, and that differs by driver: parsing a large JSON answer, walking an SNMP table and asking a held session a short question are different work. The lab’s driver cost sweep measures each shipped driver on an outpost with no simulator in its process, and make gen renders the result below (ADR-1871).

  • By kind and interval. The first table rolls drivers up by the transport they speak at a poll interval. A run costs what its kind costs whatever its interval, so millicores per task at an interval is the kind’s CPU per run over that interval. Each figure is the median across the kind’s measured drivers, with their range where more than one measured it.
  • Memory per endpoint is what one endpoint on the driver holds on the outpost; for a session transport it is the held session.
  • To size an outpost, add memory per endpoint over its endpoints and CPU per run over the interval over its tasks, beyond the idle outpost.
  • Per driver, memory and millicores per task are slopes: what the outpost’s container gains for each task it adds. Warm memory is paid once, when the first tasks of a driver land. Thread CPU per run is the outpost’s own poll-cpu-time, and thread share its part of the container’s figure: a low share is a transport doing its I/O elsewhere, not a cheap driver (outposts).

Measured 2026-11-14 on build 86d74adec, a host of 8 cores and 8 GiB, stepping about 1600 tasks at a time, and up to 6400 for a driver whose memory did not show. 16 of 31 drivers measured. boreal-beam-snmp and kestrel-relay-api were re-swept on build 3284c96e8.

Kind Interval Polled by Drivers measured Memory per task (KiB) Memory per endpoint (KiB) CPU per run (ms) Millicores per task
http 30s boreal-cast-api, tessellate-census-http 2 6.0 (6.0 to 6.0) 12.0 (11.9 to 12.0) 3.59 (3.12 to 4.06) 0.120 (0.104 to 0.135)
http 5m boreal-cast-api, tessellate-census-http 2 6.0 (6.0 to 6.0) 12.0 (11.9 to 12.0) 3.59 (3.12 to 4.06) 0.012 (0.010 to 0.014)
https 30s kestrel-api, kestrel-gaze-api, kestrel-relay-api, recording-service-api, scheduling-service-api, ucc-rooms 2 5.0 (3.5 to 6.6) 13.5 (13.2 to 13.9) 6.03 (5.07 to 6.98) 0.201 (0.169 to 0.233)
https 5m kestrel-api, kestrel-gaze-api, kestrel-relay-api 2 5.0 (3.5 to 6.6) 13.5 (13.2 to 13.9) 6.03 (5.07 to 6.98) 0.020 (0.017 to 0.023)
snmp 30s boreal-beam-snmp, boreal-edge-snmp, ferrite-pdu-snmp, lyra-arc-snmp, lyra-hx-snmp, meridian-mx-snmp, meridian-xl-snmp, polaris-amp-snmp, polaris-dsp-snmp 10 5.8 (4.9 to 10.3) 11.5 (9.7 to 13.2) 2.68 (1.54 to 3.99) 0.089 (0.051 to 0.133)
snmp 1m snmp-generic 10 5.8 (4.9 to 10.3) 11.5 (9.7 to 13.2) 2.68 (1.54 to 3.99) 0.045 (0.026 to 0.066)
snmp 5m boreal-beam-snmp, boreal-edge-snmp, ferrite-pdu-snmp, lyra-arc-snmp, lyra-hx-snmp, meridian-mx-snmp, meridian-xl-snmp, polaris-amp-snmp, polaris-dsp-snmp 10 5.8 (4.9 to 10.3) 11.5 (9.7 to 13.2) 2.68 (1.54 to 3.99) 0.009 (0.005 to 0.013)
ssh not swept none
tcp 30s newtron-core-nvp, newtron-panel-nvp, newtron-slate-nvp 2 129.6 (91.3 to 167.8) 175.2 (167.8 to 182.7) 1.83 (1.66 to 2.01) 0.061 (0.055 to 0.067)
telnet not swept none
tls not swept none
udp not swept none
webhook not swept none
wss not swept none
Driver Kind Product Polls Step (tasks) Memory per task (KiB) Memory per endpoint (KiB) Warm memory (MiB) Millicores per task CPU per run (ms) Thread CPU per run (ms) Thread share Not measured
boreal-beam-snmp snmp boreal-beam-340 5m, 30s 3200 5.9 11.7 7.9 0.043 2.34 0.37 16%
boreal-cast-api http boreal-cast-m1 5m, 30s 1600 6.0 11.9 8.7 0.057 3.12 0.34 11%
boreal-edge-snmp snmp boreal-edge-55 5m, 30s 1600 4.9 9.7 6.3 0.043 2.32 0.34 15%
boreal-edge-web http no shipped product defaults to this driver, so only an endpoint that picks it runs it; #1943 costs it by its kind of work
ferrite-pdu-api http no shipped product defaults to this driver, so only an endpoint that picks it runs it; #1943 costs it by its kind of work
ferrite-pdu-snmp snmp ferrite-pdu-4c 5m, 30s 1600 5.0 9.9 9.5 0.052 2.82 0.45 16%
kestrel-api https kestrel-vroom 5m, 30s, 30s, 30s its polls changed since the sweep; not yet measured at its polls
kestrel-gaze-api https kestrel-gaze-p2 5m, 30s 1600 6.6 13.2 15.9 0.128 6.98 0.61 9%
kestrel-relay-api https kestrel-relay-c1 5m, 30s, 30s, 5m 1600 3.5 13.9 11.2 0.093 5.07 0.48 10%
kestrel-ws wss no shipped product defaults to this driver, so only an endpoint that picks it runs it; #1943 costs it by its kind of work
lyra-arc-snmp snmp lyra-arc-a2 5m, 30s 1600 5.8 11.5 6.8 0.052 2.82 0.40 14%
lyra-hx-snmp snmp lyra-hx-1 5m, 30s 6400 0.028 1.55 0.39 25% lyra-hx-snmp memory: the sweep is not a line: a step sits 33% of its rise off the fit (residual 0.333, bound 0.100)
meridian-mx-snmp snmp meridian-mx-84 5m, 30s 1600 6.6 13.2 1.1 0.050 2.73 0.38 14%
meridian-xl-snmp snmp meridian-xl-1 5m, 30s 1600 6.4 12.8 3.4 0.061 3.33 0.48 15%
newtron-core-nvp tcp newtron-core-3 30s, 30s, 30s, 30s its polls changed since the sweep; not yet measured at its polls
newtron-nvp-ssh ssh no shipped product defaults to this driver, so only an endpoint that picks it runs it; #1943 costs it by its kind of work
newtron-nvp-telnet telnet no shipped product defaults to this driver, so only an endpoint that picks it runs it; #1943 costs it by its kind of work
newtron-nvp-tls tls no shipped product defaults to this driver, so only an endpoint that picks it runs it; #1943 costs it by its kind of work
newtron-nvp-udp udp no shipped product defaults to this driver, so only an endpoint that picks it runs it; #1943 costs it by its kind of work
newtron-panel-nvp tcp newtron-panel-7 30s, 30s 1600 91.3 182.7 0.055 1.66 0.12 7% newtron-panel-nvp warm: the loaded line starts 20.7 MiB below the idle outpost, so the first tasks filled heap it already held and no jump shows
newtron-panel-web https no shipped product defaults to this driver, so only an endpoint that picks it runs it; #1943 costs it by its kind of work
newtron-slate-nvp tcp newtron-slate-5 30s 1600 167.8 167.8 0.067 2.01 0.11 6% newtron-slate-nvp warm: the loaded line starts 24.1 MiB below the idle outpost, so the first tasks filled heap it already held and no jump shows
polaris-amp-snmp snmp polaris-amp-4100 5m, 30s 6400 0.028 1.54 0.40 26% polaris-amp-snmp memory: the sweep is not a line: a step sits 32% of its rise off the fit (residual 0.315, bound 0.100)
polaris-dsp-snmp snmp polaris-dsp-16 5m, 30s 1600 5.8 11.5 6.2 0.048 2.62 0.41 16%
recording-service-api https recording-service 30s, 30s, 30s its polls changed since the sweep; not yet measured at its polls
scheduling-service-api https scheduling-service 30s not yet measured
snmp-generic snmp generic-device 1m 1600 10.3 10.3 0.066 3.99 0.36 9% snmp-generic warm: the loaded line starts 19.2 MiB below the idle outpost, so the first tasks filled heap it already held and no jump shows
tessellate-census-feed tcp no shipped product defaults to this driver, so only an endpoint that picks it runs it; #1943 costs it by its kind of work
tessellate-census-http http tessellate-census-c1 5m, 30s 1600 6.0 12.0 9.1 0.074 4.06 0.41 10%
ucc-rooms https ucc-platform 30s, 30s its polls changed since the sweep; not yet measured at its polls
ucc-webhook webhook no polls: the driver only listens, so it runs no task to cost

The figures hold for the host and build named above the tables and for simulated components, whose answers are smaller and quicker than many real ones: read them as the relative cost of drivers and the order of an outpost’s footprint, not a promise for a site. A shipped driver the sweep has not measured says why.

One limit on an outpost is not its cost: the server sends its worklist as one bus reply, and a reply over the bus’s maximum payload after compression (1 MiB by default) is refused, leaving the outpost on its last worklist. That is about 18,000 tasks on one outpost; split a site’s devices across outposts well before it. Within a site, the server spreads unpinned components across its outposts by expected cost (load distribution).

Configuration comes in two tiers:

  • Bootstrap, from the environment: what the process needs before the database exists, such as the Postgres DSN, the listen address, the encryption key and the ingest partitions. The server variables reference is generated from the code.
  • Everything else is a setting: one typed declaration, resolved from the declared default, an optional settings file, the environment, and the admin’s binding, with provenance on every key. Only the binding is stored.

Today one server process owns the bus and the background loops: the Helm chart runs it with the Recreate strategy so two never share the JetStream store. The outposts scale out freely, one or many per site, and the edge rides out a WAN outage on its own spool. Postgres high availability is the database’s concern (a managed cluster, an operator).

Multi-tenancy: per database, per account, per deployment

Section titled “Multi-tenancy: per database, per account, per deployment”

Tenant isolation is physical, not a row predicate: a tenant is one database and one deployment. There is no tenant_id column anywhere and nothing shared to reach across, so the data model stays single-tenant in shape and multi-tenancy lives in orchestration.