Hi Godbach,
Sorry for replying late, I don't have a regular internet access at the
moment.
On Tue, Aug 06, 2013 at 07:48:46PM +0800, Godbach wrote:
> It seems that static-rr should also use the same check condition for the
> server after being selected as roundrobin and leastconn as below:
>
> if (!srv->maxconn || (!srv->nbpend && srv->served <
> srv_dynamic_maxconn(srv)))
>
> not the following:
>
> if (!srv->maxconn || srv->cur_sess < srv_dynamic_maxconn(srv)) {
Yes I agree with you, I think the reason is that the code was
extracted from the hash codes (which also fall back to RR if
the content to hash is not here), and which initially did not
need to handle this situation.
I don't remember if the hash algorithms now fall back to the
generic RR code or if they use their own, but it is possible
that more code needs fixing in the end.
Care to send a patch ? :-)
Best regards,
Willy