▲ | phyrex a day ago | |
If Hash(attribute) % buckets == 0 That's basically all you need for this. The hash algorithm doesn't matter as long as it's fast and returns a number. For your example it's "hash(user_id) % 2" because a 50/50 split has two buckets. | ||
▲ | armank-dev a day ago | parent [-] | |
I had thought about this but didn't know if it was reliable for large-scale applications. Thank you! |