Skip to content

Iperf3 does not work if the server is load-balanced #823

Description

@uablrek

Context

  • Version of iperf3:
    commit a681713

  • Hardware:
    Kvm vm

  • Operating system (and distribution, if any):
    Linux 4.19.3

  • Other relevant information (for example, non-default compilers,
    libraries, cross-compiling, etc.):

Built on Ubuntu 18.04

Bug Report

  • Expected Behavior

It should be possible to setup a number of iperf3 servers behind a load-balancer and use the client with -P option to measure bandwith to multiple servers.

This is not an uncommon measurement case and support it would enhance the usability of iperf3 IMHO. My intention was to measure bandwith towards a "service" in Kubernetes which will load-balance traffic to a number of "pods".

  • Actual Behavior

When iperf3 is used towards a load-balanced server the client most often hangs forever.

From tcpdump traces it looks like the iperf3 client actually setup 2 tcp connections, I guess some control/data channel(?). These will be load-balanced to different servers and I think that causes the problem. It works occationally, probably when the 2 tcp connects happen to hit the same server.

  • Steps to Reproduce

Simplest lb may be ecmp or multipath routing. I tested this with xcluster

Otherwise any LB solution may be used to see the problem.

  • Possible Solution

If possible, re-use the TCP connection rather than setup a new one.

This will not be sufficient for UDP tests where a -u option on the server side whould be the only clean solution I think. You may not want that, so I suggest that UDP is left as-is, TCP is the most important test case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions