I want to know, if there is a way to add/delete Apache2 mod_proxy_balancer balancer-members without doing a full restart of apache, so that the existing connections dont't get interrupted?
if i just update the members in the equal vhost-file and do a soft-restart via
service apache2 reload
apache wont apply the changes made. The provided balancer-manager
directive and web backend allows to modify the parameters of the particular blanacer-member (e.g. loadfactor) without an restart, but its not possible to add new or delete existing members in this way.
finally, due to some infrequent problems regarding
apache
andmod_proxy_balancer
(see https://issues.apache.org/bugzilla/show_bug.cgi?id=44736 for more details) i did a little workaround:first of all filling up the balancer worker configuration with placeholders an setting loadfactor to "1", e.g.:
then
mod_rewrite
is used to dynamically assign the placeholders to real balancer memebers, e.g.:adding, deleteing, enabling, disabling and setting the loadfactor of each (virtual) member is done by accessing the
balancer-manager
webinterface.to sum up,
mod_proxy_balancer
can be dynamicall modified programmatically using this workaround.