iperf icon indicating copy to clipboard operation
iperf copied to clipboard

Systemd-based socket activation

Open schaten opened this issue 3 years ago • 5 comments

  • Version of iperf3 (or development branch, such as master or 3.1-STABLE) to which this pull request applies: master

  • Issues fixed (if any): #742

  • Brief description of code changes (suitable for use as a commit message): Allow iperf3 to receive sockets from systemd.

This patch enables systemd-based socket activation of iperf3. To test, build and install this fork, then:

  • mv contrib/iperf3_@.* /etc/systemd/system/
  • systemctl daemon-reload
  • systemctl start iperf3_5201

This will make systemd listen on port 5201. As soon as a client tries to connect, iperf3 is started and takes over.

I originally wanted to add multi-user support, but this is not as easy due to the separate control / data connections. In combination with loadbalancing (i.e. based on the IP address, client could be NATted to a socket-activated iperf3 instance) it might still be useful.. Also, as the socket-activation was a separate issue, maybe it's useful to others. :)

schaten avatar Jun 19 '21 21:06 schaten