Flexihash is a small PHP library which implements consistent hashing.