Picking a server when the initial choice fails

From: Ulric Eriksson <ulric_at_siag.nu>
Date: Sun, 18 May 2008 08:25:24 +0200 (CEST)

Pen uses several different algorithms to pick the best available
server. This can be configured on the command line or by penctl
and the available choices are:

  - hash
  - priority
  - roundrobin
  - weight

Other criteria such as blacklisting and access lists affect the
selection outcome. The source distribution contains the small
file pen.c with all the details.

This is done for the initial selection. However, if this
selection fails (for example because the server recently became
unavailable and hasn't been blacklisted yet), the "second best"
server is always chosen by roundrobin.

Normally this is a relatively rare occurrence, because the dead
server will be blacklisted and not considered when the next
request comes. If all servers are more or less alike, the worst
thing that can happen is a little uneven load.

Now think about the new priority stuff. You can configure three
groups of servers like this:

Priority 1: the full site
Priority 2: a scaled-down version of the site
Priority 3: closed for business, go away

In theory, this could mean that a request *should* go to a server
from the priority 1 group, but because the initial server was
recently downed and roundrobin doesn't care about priority at
all, the request is sent to a server with priority 3.

I think this is wrong. Does anyone agree?

Ulric
Received on Sun May 18 2008 - 08:25:24 CEST

This archive was generated by hypermail 2.2.0 : Sun May 18 2008 - 08:25:24 CEST