ngx_upstream_jdomain icon indicating copy to clipboard operation
ngx_upstream_jdomain copied to clipboard

Improve `least_conn` test case

Open nicholaschiasson opened this issue 3 years ago • 0 comments

In t/004.compatibility_nginx.t, test 3 is supposed to use jdomain with the least_conn algorithm, but the test is actually quite weak, making it not obvious to determine is the least_conn algorithm is even properly working.

The test only makes single connections at a time to the test nginx server, resulting in the load balancer effectively using round robin, which is indeed a valid behaviour of least_conn, but not representative of a live scenario where the peer is actually chosen based on least connected peers.

This test case should be improved to simulated many simultaneous connections to the upstream block so we can really see least_conn in action with jdomain upstreams.

nicholaschiasson avatar Jun 05 '22 19:06 nicholaschiasson