A plurality of servers for processing client requests forward the requests
among themselves to achieve a balanced load. When a server initially
receives a client request, it randomly selects another of the plurality
of servers, referred to as a first-chance server, and forwards the
request to this server. Upon receiving the request, the first-chance
server determines if it is overloaded and if not, processes the request.
However, if overloaded, the first-chance server compares its load to the
load of one or more predetermined next-neighbor servers. If the
next-neighbor server(s) are more loaded than the first-chance server, the
first-chance server processes the request. Otherwise, the first-chance
server forwards the request to the least loaded next-neighbor server. The
next-neighbor receiving the request either processes it directly, or
alternatively, based on its current load and that of its next-neighbor
server(s), forwards the request to another next-neighbor server for
processing.