[EMAIL PROTECTED] wrote: > > costin 02/05/09 14:06:48 > > Modified: jk/native2/common jk_worker_lb.c > Log: > That's the big one. > > Please review ! > > It changes the handling of lb_value to int. I also cleaned up the logic so > it's easier ( I hope ) to understand what's happening. "Levels" replace > the 'local worker', I thing I got the logic straight for those. > > I started to add a 'introspection' data, to validate and better report > the config. > > We use one table per level. At the moment the maximum number of workers > is hardcoded ( to 255 ), we could make it dynamic but that would make things > pretty complex when we add workers dynamically ( it won't work without > a CS or atomic operations )
Hi Costin, I read your code throughly and found no problem in get_most_suitable_worker, I think your approach to prioritizing workers is the best. What bernd and I had done was mainly driven by the need to have a frontal load balancer detect the failure of the local worker(s). Since my last patch and having read yours I think I found a better way to make the load balancer detect failures. Configure all Apache instances so they see all Tomcat instances, assign a higher priority to local workers on each Apache, therefore local workers will be chosen first. On each Apache, the load balancing worker is called lb. Another load balancing worker, balancing only the local workers, is called hwlb. The hardware load balancer checks the health of the Apache servers using a URI which is served by hwlb instead of lb, therefore if there are no more local workers left alive, the requests the hardware load balancer dispatches to the associated Apache before it can detect the local workers failure will be rerouted to the other non local workers and the client will only loose its session information, she will not get any errors. When the hardware load balancer ends up detecting the local workers failure (because the hwlb worker rejected the request due to the lack of available worker), it will declare the Apache inactive and will only use the other ones. This setup solves my use cases at least, I don't know for Bernd's. There remains a related problem in jk_requtil in jk2_requtil_getCookieByName, as I mentioned several months ago on the list, the cookie extraction does not work for cookies whose format conforms to RFC 2169, that is the cookie value is enclosed in double quotes. Such cookie format is used by lynx for example. I had submitted a patch into the bug database but cannot find it anymore, I'll have to look up my archives. Good job on the lb worker Costin, Mathias. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>