A cluster generally refers to a group of hosts, such as servers, that are interconnected through a network to work as a centralized data processing resource. In most instances, a single host cannot handle the entire traffic for a given service; rather a pool of hosts is required to properly handle the traffic for the service. Since a cluster might support multiple services at the same time, each service is associated with a virtual IP (VIP) address that is used by clients to access the service. Each VIP address has a different set of hosts that provide a service associated with the VIP address.
Such clusters may employ network load balancers that split the incoming traffic for a particular VIP address onto all of the hosts of the pool associated with the VIP address. Ideally, the load balancer directs a packet to a less busy host in the pool of hosts so as to better share the load of processing the packets for the service. There are a number of different strategies that may be employed to perform such load balancing. One approach is to employ a hashing mechanism to evenly split incoming packets among the hosts in the pool associated with the VIP address. However, the current load balancing mechanisms do not ensure that packets that belong to a given session are sent to the same host in the pool even when the membership of the pool changes.