Hi everyone,
I have thought a bit on how to make sure that a particular key is distributed to ALL memcached servers in a pool.
My current, untested solution is to make another instance of memcached, something like this:
$cluster[] = array('host' => '192.168.1.1', 'port' => '11211', 'weight' => 50);
$this->tempMemcached = new Memcached;
$this->tempMemcached->addServers($cluster);
foreach ($this->cluster() as $cluster) {
$this->tempMemcached->setByKey($cluster, $key, $value, $this->compress, $expireTime);
}
$this->tempMemcache->close();
What is common sense to do in this case, when certain keys need to be stored on ALL servers for reliability?