Hello,
We've been using Pound on various sites for the past year now, and
it's proven to be a very reliable product. Many thanks to all those
who have developed it!
One feature that we use on a semi-regular basis is backend fail-over.
We will stop Apache on a backend to make configuration changes or to
do performance experiments. Yesterday however, we noticed that Pound
does not do what we would have expected, which is to redistribute the
downed backend's requests across the remaining backends. Instead,
Pound forwards all of the downed backend's requests to the next
backend in its list.
Is this behavior intentional or is it a bug? It seems that the
requests should be distributed, instead of bogging down one server.
But perhaps there is a good reason for this?
This is the code in 1.9.4 that selects a backend that is alive. It's
in a few places in get_be().
orig = n = rand() % g->tot_pri;
while(!g->backend_addr[n].alive) {
n = (n + 1) % g->tot_pri;
if(n == orig)
break;
}
There is a thr_prune() function that, in the comments, claims to
prune dead hosts, however I can't find where it or any of it's
callees does this. In any case, I think it would make more sense for
kill_be() to remove a dead backend from the list of currently
available backends than to have a separate thread that does this.
In 2.0b2 I think there may be a similar issue, but I haven't had the
time to convince myself of it.
So am I correctly understanding the code? Is it a bug?
Thanks,
Eric
|