1. A computer-implemented method for distributing tasks to a plurality of application server instances in a membership group, the method comprising: identifying, by each application server instance in the membership group, a number of task partitions owned by the each application server instance based on a predetermined time window; performing load balancing operation based on consensus among the plurality of application server instances in the membership group by comparing the number of task partitions owned by the each application server instance with an average of number of task partitions owned by the plurality of application server instances in the membership group; and generating a new membership group and a new partition ownership according to a result of the load balancing operation, wherein the new membership group includes those application server instances having lease time-stamps within the predetermined time window.