A soak test holds a steady load for a long time against a real stack (Redis, Postgres, the
gateway and a fake backend) and samples resource use as it goes. Flat lines mean the gateway does
not leak memory, connections or policy state. The numbers show what the gateway adds, not what
your game’s own backend costs.
Both runs below used one laptop and the same load: 100 calls per second from 2,000 simulated
players. They differ in how audit events reach Postgres. Repeat a run with scripts/soak.sh, or
AUDIT_QUEUE=1 scripts/soak.sh for the batching writer. The runbook
describes both and how to read the results.
How long a call takes milliseconds, through the whole pipeline to the backend and back (slowest single call: 42.02 ms)Gateway memory resident memory of the gateway container, over 14.6 minutesGateway CPU share of one core while serving the load, over 14.6 minutesPolicy keys in Redis bounded: two per simulated player, over 14.6 minutes
Show the numbers as a table
Measure
Value
Calls in total
89,900 (71,980 succeeded, 17,920 denied by policy or the backend, 0 failed)
Latency p50, p95, p99 and the slowest call
2.22, 4.59, 7.05 and 42.02 ms
Gateway memory, first and last sample
13.5 and 17.4 MiB (peak 19.5)
Gateway CPU
10.7 to 16.4 percent of one core
Redis policy keys
964 at the start, 4,000 at the end (two per simulated player)
Postgres sessions
1 at the start, 2 at the end. This is the gateway's pool filling towards its cap of 8. It was level for the second half of the run.
Readiness failures
0 in 40 samples
Measured on Darwin arm64, Docker Compose, one gateway, Redis, Postgres and a fake backend on the same machine, on 2026-11-19, with the batching audit writer on (--audit-queue). It is a single machine with a fake backend that answers instantly, so the figures show what the gateway adds (policy, validation, signing, audit and the Redis and Postgres round trips), not what your game's own backend will cost. 17,920 calls were denied on purpose by the demo's limits and the fake backend, and are not failures. Repeat it yourself withscripts/soak.sh, described in the runbook.
60 minutes, audit written per call
99.9/scalls per second, held for 59.8 minutes
6.55 msp99 latency for a full call
1 of 359,763calls failed
11 to 17.8 MiBgateway memory, start to end
How long a call takes milliseconds, through the whole pipeline to the backend and back (slowest single call: 202.09 ms)Gateway memory resident memory of the gateway container, over 59.8 minutesGateway CPU share of one core while serving the load, over 59.8 minutesPolicy keys in Redis bounded: two per simulated player, over 59.8 minutes
Show the numbers as a table
Measure
Value
Calls in total
359,763 (287,870 succeeded, 71,892 denied by policy or the backend, 1 failed)
Latency p50, p95, p99 and the slowest call
1.87, 4.45, 6.55 and 202.09 ms
Gateway memory, first and last sample
11 and 17.8 MiB (peak 18.9)
Gateway CPU
7.1 to 14.4 percent of one core
Redis policy keys
666 at the start, 4,000 at the end (two per simulated player)
Postgres sessions
7 at the start, 14 at the end. This is the gateway's pool filling towards its cap of 8, plus Postgres's own background processes. It was level for the second half of the run.
Readiness failures
0 in 97 samples
Measured on Darwin arm64, Docker Compose, one gateway, Redis, Postgres and a fake backend on the same machine, on 2026-11-19. It is a single machine with a fake backend that answers instantly, so the figures show what the gateway adds (policy, validation, signing, audit and the Redis and Postgres round trips), not what your game's own backend will cost. 71,892 calls were denied on purpose by the demo's limits and the fake backend, and are not failures. Repeat it yourself withscripts/soak.sh, described in the runbook.
The batching writer is not faster at this rate. It matters at higher rates and with a slower
database, where a call no longer waits for an INSERT. A crash can lose the events that are still
queued.