mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Improving load balancer performance
IPVS module used for swarm load balancer had a performance issue under a high load situation. conn_reuse_mode=0 sysctl variable can be set to handle the high load situation by reusing existing connection entries in the IPVS table. Under a high load, IPVS module was dropping tcp SYN packets whenever a port reuse is detected with a connection in TIME_WAIT status forcing clients to re-initiate tcp connections after request timeout events. By setting conn_reuse_mode=0, IPVS module avoids special handling of existing entries in the IPVS connection table. Along with expire_nodest_conn=1, swarm load balancer can handle a high load of requests and forward connections to newly joining backend services. Signed-off-by: Andrew Kim <taeyeonkim90@gmail.com>
This commit is contained in:
parent
1473794fb5
commit
8899d916c0
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ var (
|
||||||
gpmChan = make(chan chan struct{})
|
gpmChan = make(chan chan struct{})
|
||||||
prefix = defaultPrefix
|
prefix = defaultPrefix
|
||||||
loadBalancerConfig = map[string]*kernel.OSValue{
|
loadBalancerConfig = map[string]*kernel.OSValue{
|
||||||
|
// disables any special handling on port reuse of existing IPVS connection table entries
|
||||||
|
// more info: https://github.com/torvalds/linux/blob/master/Documentation/networking/ipvs-sysctl.txt#L25:1
|
||||||
|
"net.ipv4.vs.conn_reuse_mode": {Value: "0", CheckFn: nil},
|
||||||
// expires connection from the IPVS connection table when the backend is not available
|
// expires connection from the IPVS connection table when the backend is not available
|
||||||
// more info: https://github.com/torvalds/linux/blob/master/Documentation/networking/ipvs-sysctl.txt#L126:1
|
// more info: https://github.com/torvalds/linux/blob/master/Documentation/networking/ipvs-sysctl.txt#L126:1
|
||||||
"net.ipv4.vs.expire_nodest_conn": {Value: "1", CheckFn: nil},
|
"net.ipv4.vs.expire_nodest_conn": {Value: "1", CheckFn: nil},
|
||||||
|
|
Loading…
Reference in a new issue