Edge gateway sizing
Measurement-based edge gateway capacity guidance — no published throughput tiers.
This page summarizes guidance from the internal measurement harness. There is no public dp/s tier or SLA commitment.
What we measure
Harness (deploy/scripts/edge-loadtest.mts) ramps SIMULATOR load (e.g. 500 → 10,000 dp/s). Each step records:
- Edge outbox depth trend
- CPU / RAM (heartbeat metrics)
- Hub telemetry queue pending (JetStream → Postgres worker lag — not plant
outbox.sqlite) - Hub
configRevision/ edgeappliedRevisionmatch
Sample windows are minutes (default 180 s per step), not 20 s marketing smoke. Compose drain defaults match the product policy: min 2000 / max 20,000 dp/s, batch 2000. Results: docs/todo/edge-gateways/capacity.md.
Fleet load (EG-10.05): separate fleet harness runs N gateways × modest SIMULATOR (default 10 × 50 tags @ 1 Hz ≈ 500 dp/s combined) — not N copies of the single-gateway 10k ramp. npm run edge:fleet-loadtest; lab results stay in the fleet table in capacity.md.
Run the harness
GATEWAY_ID=11 MACHINE_ID=1 SAMPLE_SEC=180 CLEANUP=1 \
npm run edge:loadtestRequirements: paired ONLINE gateway, admin API access, SIMULATOR driver on edge.
Console settings
Gateway detail → Overview → Outbox & drain policy:
| Knob | Role |
|---|---|
| Outbox max rows | SQLite store-and-forward upper bound |
| Max age (hours) | Prune stale rows |
| Drain min / max dp/s | Adaptive WAN drain rate (ceiling when backlog grows) |
| Batch / in-flight | NATS publish parallelism |
Changes ship via manifest — no on-site .env edit required after pairing.
Container limits
edge-compose.yml defaults: EDGE_CPUS=2, EDGE_MEM_LIMIT=1g. For high tag counts, raise limits or use per-device ON_CHANGE publish policy so you do not flood the WAN.
