add consistent hashing

Signed-off-by: Wei Jin <wjin.cn@gmail.com>