What is a ’Chooser plugin’ ?
Chooser plugins have the task of switch between the available
servers & clusters. The cluster’s choose is based on the the
rule plugin (this plugin is described in the following
section). The basic concept is that the rule plugins choose
between clusters, and the chooser plugin choose between
the servers in a cluster (based in their response time,
load, status, etc). These plugins are protol-independent.
We have the following chooser plugins available in Load Balancer:
This is a generic round robin chooser plugin. The servers in
a cluster are transversed in order (skipping the disabled
servers) so the number of request that they serve are more
or less the same. This method has the drawback that the
servers’ stats are not used, so a request can be attended
by a busy server). Is the most simple method I can program
to switch between servers.
This is a generic best-first chooser plugin. This plugin
always select the best available server in a given cluster.
At the first sight, this method can result as a ’hog resource’
one, but because the poll interface periodically updates the
server’s stats, the load is distributed between the servers
in a straight way. Is a more advanced method than round-robin’s.