特定のキーがプール内のすべての memcached サーバーに確実に配布されるようにする方法について少し考えました。
私の現在のテストされていない解決策は、次のような memcached の別のインスタンスを作成することです。
$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();
信頼性のために特定のキーをすべてのサーバーに保存する必要がある場合、この場合に行うべき常識は何ですか?