]> git.baikalelectronics.ru Git - kernel.git/commit
ipvs: add weighted random twos choice algorithm
authorDarby Payne <darby.payne@gmail.com>
Wed, 6 Jan 2021 19:02:42 +0000 (11:02 -0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 26 Jan 2021 00:09:46 +0000 (01:09 +0100)
commita9ec8dd5485bf4abb579b17cd48deb9e1166ed60
tree40b35a1f3a3d603c82a49071e65724b752bbfa05
parent3881c44d0a9280268588de8a8fb777afa9b9227d
ipvs: add weighted random twos choice algorithm

Adds the random twos choice load-balancing algorithm. The algorithm will
pick two random servers based on weights. Then select the server with
the least amount of connections normalized by weight. The algorithm
avoids the "herd behavior" problem. The algorithm comes from a paper
by Michael Mitzenmacher available here
http://www.eecs.harvard.edu/~michaelm/NEWWORK/postscripts/twosurvey.pdf

Signed-off-by: Darby Payne <darby.payne@gmail.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipvs/Kconfig
net/netfilter/ipvs/Makefile
net/netfilter/ipvs/ip_vs_twos.c [new file with mode: 0644]