]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipvs: count pre-established TCP states as active
authorMichal Kubecek <mkubecek@suse.cz>
Fri, 3 Jun 2016 15:56:50 +0000 (17:56 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 Sep 2016 09:14:20 +0000 (11:14 +0200)
commitb9fe5ee13b710dbe49eb34f63066096d5de29254
tree25afc124692852b113643f4945e66727f42655fc
parentaf29d5b57acef4c573c8361a509908115b9ced68
ipvs: count pre-established TCP states as active

commit be2cef49904b34dd5f75d96bbc8cd8341bab1bc0 upstream.

Some users observed that "least connection" distribution algorithm doesn't
handle well bursts of TCP connections from reconnecting clients after
a node or network failure.

This is because the algorithm counts active connection as worth 256
inactive ones where for TCP, "active" only means TCP connections in
ESTABLISHED state. In case of a connection burst, new connections are
handled before previous ones have finished the three way handshaking so
that all are still counted as "inactive", i.e. cheap ones. The become
"active" quickly but at that time, all of them are already assigned to one
real server (or few), resulting in highly unbalanced distribution.

Address this by counting the "pre-established" states as "active".

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/netfilter/ipvs/ip_vs_proto_tcp.c