SpitfireLoad Testing & APMWhat's new

Source IPs (IP spoofing)

VUs connect from several of the runner's IPs, so a load balancer, a WAF or a per-client limit sees many clients instead of one. You add the IPs to the network interface; Spitfire only uses them. Each VU gets one IP in turn and keeps it for the whole run.

How to add IPs (Linux)

  1. See the interface name:

    bash
    ip -br addr show
  2. Add the IPs (replace eth0 and 10.0.0.x/24 with your values):

    bash
    for i in $(seq 11 20); do sudo ip addr add 10.0.0.$i/24 dev eth0; done
  3. Keep them after a reboot with NetworkManager (replace "System eth0" with the name from nmcli connection show):

    bash
    sudo nmcli connection modify "System eth0" +ipv4.addresses "10.0.0.11/24,10.0.0.12/24"

    On Ubuntu with netplan, add the IPs to the addresses list in /etc/netplan/*.yaml and run sudo netplan apply.

How to add IPs (Windows)

  1. In an administrator PowerShell, see the interface name:

    powershell
    Get-NetIPAddress -AddressFamily IPv4 | Format-Table InterfaceAlias, IPAddress
  2. Add the IPs with SkipAsSource (Windows does not use them for its own traffic; replace "Ethernet" with the name from step 1):

    powershell
    11..20 | ForEach-Object { New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress "10.0.0.$_" -PrefixLength 24 -SkipAsSource $true }

How to use it in Docker

  1. Put the runner on the server's network (Linux only; the choice is saved and kept on re-installs and updates):

    bash
    ~/spitfire/install.sh runner --runner-host-network on

    If the runners are on the same server as the controller, write docker instead of runner. For a new server, tick Server's network, for source IPs under Runners → Add runner → Docker and copy the command.

How to use it in Kubernetes

  1. Label the node you added IPs to (replace NODE with the node name):

    bash
    kubectl label node NODE spitfire.io/source-ips=true
  2. Run the runner pods on the node network, only on those nodes:

    bash
    helm upgrade spitfire spitfire/spitfire -n spitfire --reuse-values --set runners.hostNetwork=true --set 'runners.nodeSelector.spitfire\.io/source-ips=true'

If you do not want the node network, give the pod a second interface with Multus + macvlan:

  1. Create a NetworkAttachmentDefinition named spitfire-macvlan (type: macvlan, master: eth0, the IP range your network admin set aside).

  2. Attach the network to the runner pods:

    bash
    helm upgrade spitfire spitfire/spitfire -n spitfire --reuse-values --set 'runners.podAnnotations.k8s\.v1\.cni\.cncf\.io/networks=spitfire-macvlan'

How to turn it on in a test

  1. On the Runners page, check that the runner shows "N source IPs" (new IPs show up within 30 s).
  2. Open the test and under Options → Source IPs pick All of the runner's IPs or IPs / CIDRs I pick.
  3. Save the test and start it.
  4. When the run ends, see each IP's VUs and connections on the Source IPs card.

How to check it works

  1. From the runner server, send a request from one IP (replace 10.0.0.11 and TARGET):

    bash
    curl --interface 10.0.0.11 -sS https://TARGET/
  2. Check that the target's access logs show different client IPs.

Details

Topic Info
Coverage HTTP/1.1, HTTP/2, HTTP/3, WebSocket, SSE, GraphQL, MQTT, NATS, RabbitMQ: the VU's IP. SQL, Redis, MongoDB, Kafka, gRPC pools: connections are spread over the IPs in turn. Browser steps and external engines (k6, JMeter, Locust): not used
Missing IP If an IP is on no runner, or a runner has no IP at all, the run does not start and the message says what is missing
Several runners Each runner uses its own IPs
IPv4 / IPv6 The IP of the target's family is used; with none of that family the operating system picks
Routing IPs in the same subnet need nothing more. IPs from another subnet need a static route of that range to the runner, or connections time out
NAT With NAT in between, the target sees every connection from the NAT's address
Cloud On AWS/Azure/GCP, assign the IPs to the network card first (secondary private IPs), then add them to the operating system
Docker Desktop On Mac/Windows the host network does not show the machine's IPs; use Linux
Runners page shows 1 IP (172.17.x.x / pod IP) The runner is on the container/pod network; use the host network or Multus