comparison upstream_random.t @ 1427:eb1d883305ea

Tests: avoid edge cases in upstream random two test. Unavailable servers contribute to the number of attempts, if selected, before the balancer would fall back to the default round-robin method. This means that it's quite possible to get server with more connections. To facilitate with selecting two alive servers, down server was removed from the upstream configuration at the cost of slightly worse coverage.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 10 Jan 2019 17:42:34 +0300
parents a37d8526e691
children 144c6ce732e4
comparison
equal deleted inserted replaced
1426:a8d18c2852ab 1427:eb1d883305ea
47 upstream lc { 47 upstream lc {
48 zone lc 1m; 48 zone lc 1m;
49 random two; 49 random two;
50 server 127.0.0.1:8081; 50 server 127.0.0.1:8081;
51 server 127.0.0.1:8082; 51 server 127.0.0.1:8082;
52 server 127.0.0.1:8083 down;
53 } 52 }
54 53
55 upstream w { 54 upstream w {
56 zone w 1m; 55 zone w 1m;
57 random two least_conn; 56 random two least_conn;