I have some data that I want to store in memcached (using the PHP libmemcached client: https://www.php.net/manual/en/intro.memcached.php). It's something that's hit extremely frequently across my web app.
In order to reduce the amount of traffic to a single memcached node I append a random number between 1 and 10 to the end of the key, in hopes that the client will not store all of the keys on a single node.
I had assumed that the process of assigning a key was random, but across 15 nodes at least half of the keys went to the same node. That makes me think there is something more deterministic about how it decides which node to use for a given key.
Does anyone know how it's done?