Runners and locations
Runners generate the load; the controller splits a test across runners and collects metrics every second. A location is where a runner sends load from (istanbul, frankfurt). A runner connects out to the controller; no inbound port is needed on the runner's server.
How to add a runner
- Open Settings → Runners & Towers → Runners and click Add runner.
Runners page: 1 Add runner button
- Change Location name if needed (lower case, a-z, 0-9,
-,_,.). - Pick the tab for your server: Docker, Without Docker (systemd) or Windows.
- Take the command with Copy and run it on the runner's server.
- When the dialog shows Joined: , click Done.
Add runner dialog: 2 location, 3 tabs, 4 install command, 5 joining line
Several runners can join with the same command; the key stays valid.
If the dialog says "The controller's external address is not configured", the address in the commands is a guess; if the remote server cannot reach it, correct it in the command. Permanent fix: --grpc-public-addr HOST:PORT at installation or SPITFIRE_GRPC_PUBLIC_ADDR on the controller.
Remote runner with Docker
Run the command from the Docker tab:
curl -fsSL https://spitfire.sh | SPITFIRE_VERSION={{version}} bash -s -- runner \ --controller spitfire.example.com:8471 --token sfrun_... --ca-pin sha256:... --location frankfurt --runners 1Check it; you should see
Up ...for each runner:docker ps --filter name=spitfire-runner --format '{{.Names}} {{.Status}}'
A single container without Compose:
docker run -d --name spitfire-runner --restart unless-stopped \
-e SPITFIRE_RUNNER_CONTROLLER=spitfire.example.com:8471 \
-e SPITFIRE_RUNNER_TOKEN=sfrun_... \
-e SPITFIRE_RUNNER_CA_PIN=sha256:... \
-e SPITFIRE_RUNNER_EPHEMERAL=true \
usespitfire/spitfire:<release> spitfire-runnerLinux server without Docker
Run the three lines from the Without Docker (systemd) tab:
curl -fsSLo install-runner.sh http://CONTROLLER:8470/api/v1/runner-dist/install-runner.sh echo "<sha256 from the page> install-runner.sh" | sha256sum -c - sudo bash install-runner.sh --from http://CONTROLLER:8470 \ --controller CONTROLLER:8471 --token sfrun_... --ca-pin sha256:...Check it; it must print
active:systemctl is-active spitfire-runner@1
The Without Docker (systemd) tab of the Runner key dialog: the install-runner.sh download, the sha256 check and the .gz files for an offline install
Windows service without Docker
On the Windows tab copy Without Docker, as a Windows service (Administrator PowerShell) (with Docker Desktop: With Docker Desktop (PowerShell)).
Run it in an Administrator PowerShell. For several runners add
-Count Nat the end.Check it; every service must be
Running:Get-Service spitfire-runner-*
The Windows tab of the Runner key dialog: the Docker Desktop command and the Windows service install command
How to split load across locations
- Click Run on the test.
- In the Run test dialog pick By location.
- Enter each location's share (100% in total) and runner count.
- Click Start.
The By location tab of the Run test dialog: each location's share and runner count, Spread evenly and Start
How to update runners
- systemd and Windows service: click Update next to the runner (or Update N runners to X).
- Docker and Kubernetes: run the install command again.
Update runners automatically (off by default) updates idle runners one at a time per location.
How to drain or remove a runner
- Before maintenance click Stop assigning new runs (drain); to undo, Accept new runs again.
- To take it out click Remove and tick Also revoke its registration key.
- Remove it from the server too: Removing what you installed → Runner.
How to let runner traffic through a firewall
A load test looks like an attack to a firewall or WAF; requests get rate limited. Spitfire marks every request of a run; the setting is in the Traffic mark for firewalls and APM card on the Runners page (install admin).
- Turn on Send the secret traffic key.
- Click Save; a key starting with
sfk_is made. - Copy Value for the firewall rule and give it to the firewall admin.
- Have the rule apply only when the runner's IP address and this key come together (examples below).
- If the key leaks, click Make a new key.
| Header | Value | What for |
|---|---|---|
X-Spitfire-Run |
the run's id | Ties the request to the run in logs and APM |
Baggage |
spitfire.run=<run id> |
Span tag in OpenTelemetry APMs |
X-Spitfire-Key (name can be changed) |
an installation's own secret key | Firewall/WAF rule that skips rate limiting |
Firewall and WAF examples
In the examples 203.0.113.10 is the runner's IP and sfk_EXAMPLE is your key.
Cloudflare WAF: Security → WAF → Custom rules, action Skip (Rate limiting and Managed rules ticked):
(ip.src in {203.0.113.10} and any(http.request.headers["x-spitfire-key"][*] eq "sfk_EXAMPLE"))nginx: turn limit_req off for the runner only:
geo $sf_ip { default 0; 203.0.113.10 1; }
map "$sf_ip:$http_x_spitfire_key" $sf_limit_key {
default $binary_remote_addr;
"1:sfk_EXAMPLE" ""; # empty key = no limit
}
limit_req_zone $sf_limit_key zone=api:10m rate=20r/s;AWS WAF: the rule goes before the rate-based rules, action Allow:
{
"Name": "spitfire-load-test",
"Priority": 0,
"Action": { "Allow": {} },
"Statement": { "AndStatement": { "Statements": [
{ "IPSetReferenceStatement": { "ARN": "<runner IP set ARN>" } },
{ "ByteMatchStatement": {
"FieldToMatch": { "SingleHeader": { "Name": "x-spitfire-key" } },
"PositionalConstraint": "EXACTLY",
"SearchString": "sfk_EXAMPLE",
"TextTransformations": [ { "Priority": 0, "Type": "NONE" } ] } }
] } },
"VisibilityConfig": { "SampledRequestsEnabled": true, "CloudWatchMetricsEnabled": true, "MetricName": "spitfire" }
}Other firewalls follow the same logic: source IP and header equality → skip the rate limit. Turning the rule off or rotating the key after the test is safest.
APM: tag, don't drop
If you drop the test's requests in the APM, the Run → Backend tab and APM can't find the test's traces. Tag the requests and leave the tag out of production dashboards and alerts. Instrumentations that capture the header (OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_HEADERS=x-spitfire-run) put http.request.header.x-spitfire-run on the span; turn it into one tag in the Collector:
processors:
attributes/spitfire:
actions:
- key: load_test
value: "true"
action: insert
include:
match_type: regexp
attributes:
- key: http.request.header.x-spitfire-run
value: ".+"If they must never reach a paid APM, split the Collector into two pipelines: one drops the test's spans with filter and sends to the APM, the other sends everything to the Tempo/Jaeger Spitfire reads:
processors:
filter/drop-spitfire:
error_mode: ignore
traces:
span:
- 'attributes["load_test"] == "true"'In other APM tools collect the X-Spitfire-Run header as a tag and use a "tag missing" filter in dashboards.
Capacity: how many VUs a runner carries
Starting numbers for planning; the most accurate is to watch the CPU column on a small run.
| Resource | About |
|---|---|
| CPU | ~5,000 HTTPS requests/s per vCPU (JSON of a few KB) |
| Memory | ~3,000 VUs per GB (a waiting VU holds ~70 KB) |
| Browser VU | ~350 MB and ~20% of a core; 4 vCPU / 8 GB ≈ 10 browser VUs |
| VUs → requests/s | requests/s ≈ VUs ÷ (response time + think time); 1,000 VUs, 200 ms, 1 s → ~830 |
| Network | 10,000 requests/s × 5 KB ≈ 400 Mbit/s |
When CPU turns red the "Runner CPU at its limit: results may be skewed" warning shows; add runners. --max-vus is informational only.
Runners on Kubernetes
Change the runner count:
kubectl -n spitfire scale deploy/spitfire-runner --replicas=NFor no always-on runners install on demand:
install.sh kubernetes --runners 0 --on-demand-runners 20. A run opens pods (20-60 s) and deletes them when it ends.
Pod size: SPITFIRE_ONDEMAND_CPU, SPITFIRE_ONDEMAND_MEMORY, SPITFIRE_ONDEMAND_VUS_PER_RUNNER (default 1000 VUs).
TLS pin and certificates
| Case | What to use |
|---|---|
| Default (8471, always TLS) | --ca-pin sha256:… (the pin is under the key dialog; several with commas) |
Your own certificate on the controller (SPITFIRE_GRPC_TLS_CERT, SPITFIRE_GRPC_TLS_KEY) |
--tls (system CAs) or --ca <PEM file> |
| Testing only | --tls-insecure |
| Same machine or cluster | Plain internal port 8475 (SPITFIRE_GRPC_INTERNAL_ADDR); never expose it |
With the red "The runner endpoint has no TLS (SPITFIRE_GRPC_TLS=off)" warning, do not connect from another location.
Details
| Topic | Note |
|---|---|
| Local runner | Comes with the install (2 on Docker, --runners N), location local, internal port 8475. Count: ~/spitfire/install.sh docker --runners 4 |
| Remote runner | Docker, systemd or Windows service; 8471, TLS + pin |
| Heartbeat | Every 2 s; after ~6 s without one Offline, reconnects at most 15 s apart |
| States | Idle, Running, Draining, Offline; another release gets the yellow older release, Clock offset above 50 ms turns yellow |
| Location priority | A location bound to the key, otherwise the runner's --location |
| Other ways to split | By labels (--labels region=eu), Pick, By count |
| Location threshold | {"metric":"req_duration","filter":{"location":"frankfurt"},"expr":"p(95)<800"}; cannot be combined with a scenario/step filter |
| Free edition | With two or more runners, the last by name runs only synthetic monitors |
| Ephemeral | Container runners use SPITFIRE_RUNNER_EPHEMERAL=true; the old record goes after 5 min (SPITFIRE_RUNNER_REAP_AFTER) |
| systemd identity | --id-file and <id-file>.secret; if .secret is lost the runner joins as new |
| Offline Linux | With the .gz file from the tab: --binary ./spitfire-runner-linux-amd64.gz; --instances N |
| Settings and logs | Docker ~/spitfire/deploy/runner/.env; systemd /etc/spitfire/runner.env, journalctl -u spitfire-runner@1; Windows %ProgramData%\Spitfire\logs |
| Revoking a key | Connected runners drop right away unless in a run; a systemd runner exits with code 3 |
| Release (by hand) | sed -n 's/^SPITFIRE_IMAGE=//p' ~/spitfire/deploy/docker/.env |
Runner environment variables
Every --flag can also be given as the SPITFIRE_RUNNER_<FLAG> environment variable:
| Flag | Environment variable | Meaning |
|---|---|---|
--controller |
SPITFIRE_RUNNER_CONTROLLER |
The controller's gRPC address (HOST:PORT) |
--token |
SPITFIRE_RUNNER_TOKEN |
Registration key (sfrun_…) |
--name |
SPITFIRE_RUNNER_NAME |
Name shown in the UI (default: host name) |
--location |
SPITFIRE_RUNNER_LOCATION |
Location (a location bound to the key wins) |
--labels |
SPITFIRE_RUNNER_LABELS |
Labels, e.g. region=eu,zone=a |
--ca-pin |
SPITFIRE_RUNNER_CA_PIN |
Controller key pin; implies TLS |
--tls |
SPITFIRE_RUNNER_TLS |
TLS with the system CAs |
--ca |
SPITFIRE_RUNNER_CA |
PEM CA file to verify against |
--ephemeral |
SPITFIRE_RUNNER_EPHEMERAL |
A runner that is replaced rather than restarted |
--max-vus |
SPITFIRE_RUNNER_MAX_VUS |
Advertised capacity (informational) |
--debug |
SPITFIRE_RUNNER_DEBUG |
Debug logging |
Common problems
| Symptom | Cause | Fix |
|---|---|---|
| "No runners connected, so tests can't start." or "Not enough idle runners" | No runner connected, or all are in another run or draining | Check the states. For local runners: docker compose -p spitfire -f ~/spitfire/deploy/docker/docker-compose.yml ps; if stopped, run the installer again |
| Runner Offline, Last seen keeps growing | The process stopped or the network path to the controller broke | Read the log: docker logs spitfire-runner or docker compose -p spitfire-runner -f ~/spitfire/deploy/runner/docker-compose.yml logs runner, on systemd journalctl -u spitfire-runner@1, on Windows %ProgramData%\Spitfire\logs. Test the port with nc -vz CONTROLLER 8471 |
Runner never shows up; log says invalid enrollment token |
The key was copied wrong or revoked | Create a new key and run the command again |
| Installer stops at the pin check, or a TLS error | Pin of another controller, wrong address, or a device intercepting TLS | Copy the pin again from the dialog, make sure the address is this controller's 8471; with your own certificate use --tls or --ca |
| "No idle runners with a location." | The runners connected without a location | Reconnect with a location-bound key or pass --location |
| Clock offset yellow | The runner's clock is more than 50 ms off | Turn on NTP on the runner's server |
| On Kubernetes an on-demand run waits in the queue | Pods cannot start (no resources, image cannot be pulled) | See why with kubectl -n spitfire describe pod <pod> and on the System events page |
Related pages
- Source IPs (IP spoofing): VUs connecting from several of the runner's IPs
- Installation
- License
- Runs and results