MEDIUM: spoe: Use an ebtree to manage idle applets
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 24 Jan 2018 15:37:57 +0000 (16:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Feb 2018 15:00:32 +0000 (16:00 +0100)
commitb077cdc01268e709cb8dea426a409f828986da0f
tree32b229f48c49e0481f6345caa3e1f30db34b1755
parent8f82b203d50b1a11f061b488af1e8ca373f823a7
MEDIUM: spoe: Use an ebtree to manage idle applets

Instead of using a list of applets with idle ones in front, we now use an
ebtree. Aapplets in the tree are idle by definition. And the key is the applet's
weight. When a new frame is queued, the first idle applet (with the lowest
weight) is woken up and its weight is increased by one. And when an applet sends
a frame to a SPOA, its weight is decremented by one.

This is empirical, but it should avoid to overuse a very few number of applets
and increase the balancing between idle applets.
include/types/spoe.h
src/flt_spoe.c