ipvs: allow rescheduling of new connections when port reuse is detected
authorMarcelo Ricardo Leitner <mleitner@redhat.com>
Mon, 23 Feb 2015 18:02:34 +0000 (15:02 -0300)
committerSimon Horman <horms@verge.net.au>
Wed, 25 Feb 2015 04:46:35 +0000 (13:46 +0900)
commitd752c364571743d696c2a54a449ce77550c35ac5
tree160b607482c080c720f27626fa7a7130307cbbf3
parent7f73b9f1ca7334eec0ff9a40e37ece92dd3e420f
ipvs: allow rescheduling of new connections when port reuse is detected

Currently, when TCP/SCTP port reusing happens, IPVS will find the old
entry and use it for the new one, behaving like a forced persistence.
But if you consider a cluster with a heavy load of small connections,
such reuse will happen often and may lead to a not optimal load
balancing and might prevent a new node from getting a fair load.

This patch introduces a new sysctl, conn_reuse_mode, that allows
controlling how to proceed when port reuse is detected. The default
value will allow rescheduling of new connections only if the old entry
was in TIME_WAIT state for TCP or CLOSED for SCTP.

Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Documentation/networking/ipvs-sysctl.txt
include/net/ip_vs.h
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_ctl.c
net/netfilter/ipvs/ip_vs_sync.c