Add a NATS cluster message-speed bench (throughput and delay).
Some checks are pending
offline / test (push) Waiting to run

Client LXC 510 against nats-a/b/c at several core and JetStream r=3 loads.
This commit is contained in:
George Lambert 2026-09-12 00:56:48 -04:00
parent 8f0ea8dd31
commit fef7590c27
34 changed files with 708 additions and 1 deletions

View file

@ -41,4 +41,27 @@ bash scripts/ensure-streams.sh
nkeys/mTLS: `verae-nats-accounts` still has the INTERNAL/LEAF sketch. Do **not** enable accounts on this cluster until every client passes credentials in `NATS_URL`. Private `vmbr1` is the current isolation.
## Message speed (throughput + delay)
From a **client that is not a nats-* server** (LXC 510 `verae-px-worker`):
```bash
# on NS1
bash scripts/bench.sh
```
That writes `results/<utc>/` and copies a summary to [BENCH.md](BENCH.md). Core NATS is fire-and-forget; JetStream rows use **file** storage and **replicas=3**. Ping delay is sequential RTT; flood delay is queueing under burst.
Latest run (`20260912T045131Z`):
| Kind | Load | Result |
|------|------|--------|
| Core 1p1s 50k×128 B | pub/sub | ~1.20M msgs/s aggregate |
| Core 8p8s 200k×128 B | pub/sub | ~2.01M msgs/s aggregate |
| Core 4p4s 50k×1 KiB | pub/sub | ~630k msgs/s (~616 MB/s aggregate) |
| JetStream r=3 file | 14 pubs, 128 B | ~16k durable pubs/s |
| JetStream r=3 file | 4 pubs, 1 KiB | ~13.5k durable pubs/s |
| Ping 1k×128 B | sequential RTT | avg 0.307 ms, p99 0.734 ms |
| Flood 8p 20k×128 B | burst queueing | avg 454 ms |
Hardware move: same three configs, three boxes, private NIC only — change IPs in `cluster.env` and `conf/nats.conf.tmpl`.