>This is actually very easy with the existing code and a tiny patch I
>submitted a few weeks ago.  We're using it in production mode, so it is
>known to be stable.  The first version I submitted had some additional
>logging added, but I'm attaching a minimal patch.
>
>All you have to do is set the lbfactor in workers.properties to 0, and
>it should never select that worker unless the session route points to
>it, or the primary worker is down.

Exactly what we want :)

>This also has the added benefit of making externally load balanced
>clusters behave properly for AOL/Compuserve users without special
>configuration of the load balancer.  Those services use IP randomizing
>proxies which break generic IP-based sticky.  This will cause the
>sessions to be re-routed from the Apache that receives the request to
>the Tomcat that initiated the session.  This actually works, because we
>were able to remove all of our special configurations to deal with this
>from our load balancers.  The problem is described at
>http://webmaster.info.aol.com/index.cfm?article=15

>This patch changes the behavior by pre-initializing lb_value for each
>worker.  The selection algorithm searches for the worker with 
>the lowest
>lb_value that is not in a failed state.  It then increments 
>the lb_value
>by the lb_factor.  lb_factor is set to the inverse (1/x) of the
>lb_factor specified in the config file.  When lb_factor in the config
>file is 0, this number becomes basically MAX_DOUBLE.  That means that
>lb_value becomes MAX_DOUBLE, so it will never be selected for any
>practical purposes.
>
>This patch has been tested extensivly in production use, and works
>perfectly.

Seems fine to me. I'll commit it today :)

Reply via email to