Patent ID: 8095935

Claim:
At a load balancing server in a computerized environment comprising one or more load balancing components, a plurality of servers in a server farm, and one or more clients that request processing in the server farm, a method of automatically distributing messages in processing requests using a combination of server assignment functions, each request comprising a plurality of messages, the method comprising the acts of: receiving from a client a first message to be processed by one or more applications in a server farm, wherein the server farm comprises a plurality of servers; routing the first message using a first routing mode by using a hashing function to identify a first server in the server farm to process the first message, the hashing function employing a first list of the plurality of servers in the server farm; receiving an indication that the number of available servers in the server farm has changed; switching to a second routing mode that employs the hashing function and a mapping function simultaneously for routing subsequently received messages such that, for each subsequently received message, the following are performed: determining whether an entry exists in a map that corresponds with the subsequently received message such that: if an entry exists, the subsequently received message is routed to the server identified by the entry, whereas, if an entry does not exist, and the subsequently received message is not the first message in a request, using the hashing function, with the first list, to identify a server to send the subsequently received message to; and if an entry does not exist, and the subsequently received message is the first message in a request, using the hashing function, with an updated list of available servers, to identify a server to send the subsequently received message to, and adding an entry to the map to identify the server to which the subsequently received message was sent; determining that the map contains no entries; and switching back to the first routing mode.