implements consistent hashing with db name