Skip to content

Scaling and availability

One machine runs one of each service by default. Each part that does the work scales on its own.

Each runner runs a few scenarios at once, and each run goes to exactly one runner. For more at once:

docker compose up -d --scale runner=4

Each load generator sends one share of a load run, about 2,000 requests a second on a 6 vCPU server. Start more to share bigger runs, or to run more at once:

docker compose up -d --scale loadgen=4
  • MAX_LOAD_RATE (5,000) caps what any run asks for in total, however many load generators share it.
  • LOAD_WORKER_RATE (2,000) is what one sends, for runs that leave the number of load generators to the Platform. Lower it on slower machines: a run whose load generators fell behind says so.
  • A run waits in the queue until enough load generators are free. Stopping one fails the run it’s on at once.

Several simulator instances can serve the same hosts, behind a TCP load balancer that ships with the Compose files:

docker compose -f compose.yaml -f compose.ha.yaml up -d
  • SIM_REPLICAS instances (3 by default) run behind an HAProxy that publishes the hosts’ ports and spreads connections across them. Its configuration covers every host, so it doesn’t change when hosts do.
  • Hosts with rules run on every instance. A stateful issuer runs on one instance at a time, and moves to another within a second when its instance stops, or within five seconds when it dies or its machine is lost; its requests are refused meanwhile, and its balances are kept on the bus.
  • When an instance stops, its connections close and clients reconnect to another one. Only the requests in flight on those connections are lost.
  • Runners, load runs and the reference switch reach hosts through the balancer.

If an instance under heavy load loses a stateful issuer it still needs, lengthen how often it renews its hold on the issuer and how long others wait before taking it over, together, on the simulator service in a compose.override.yaml:

services:
simulator:
environment:
ISO8583SIM_PLATFORM_SIM_LEASE_RENEW: "2" # seconds, 1 by default
ISO8583SIM_PLATFORM_SIM_LEASE_EXPIRY: "10" # seconds, 5 by default

What the Platform stores grows with use, and each kind has a limit.

What Limit
The message log Each simulated host logs at most the data policy’s rate, 1,000 exchanges a second by default, and counts the rest. The log keeps at most LOGS_MAX_ENTRIES entries, 10 million by default (about 6 GB), and none older than the policy’s retention, 7 days by default.
Run results Kept for the policy’s run retention, 90 days by default. A running load run stores one row a minute (about 2.7 KB) after its latest hour, so a day of nonstop load adds about 4 MB.
Captures Every capture together holds at most CAPTURES_MAX_BYTES of messages, 10 GiB by default, which takes about 2.6 times that in the database. Each capture is also limited to CAPTURE_MAX_FRAMES messages (10 million by default, about 2.4 GB) and to 7 days.
The message bus Its streams have limits of their own. The traffic log stops at 1 GiB, and load windows and host metrics are kept for 24 hours.

PostgreSQL reuses the space that deleted rows leave. It gives back to the disk only free space at the end of a table, which it does on its own once that space is empty. After lowering a limit, or upgrading an install whose message log grew before it had one, the files may stay larger than the log needs until you compact the table. Compacting rewrites the table and locks it while it runs, so do it when the log isn’t needed:

docker compose exec db psql -U platform -d logs -c "VACUUM FULL message_log"

The workbench and the MCP server keep nothing, and the assistant keeps its policies and audit in its own database; all three can be scaled the same way. The message bus and PostgreSQL run as one container each.