title: PHP Memcached sessions replica issue
body: <p>I have setup a couple of Memcached servers to use as PHP session storage, but despite trying various settings I'm unable to get the session keys to appear in both servers.</p>
  
  <p>My php.ini is as follows:</p>
  
  <pre><code>session.save_handler = memcached
  session.save_path = "192.168.134.38:11211,192.168.134.234:11211"
  </code></pre>
  
  <p>My memcached.ini is variations of:</p>
  
  <pre><code>extension=memcached.so
  memcached.sess_consistent_hash=1
  memcached.sess_number_of_replicas=1
  memcached.sess_binary=1
  </code></pre>
  
  <p>If I run memcached using -vv I can see keys are being written to the first server:</p>
  
  <pre><code>&lt;30 new auto-negotiating client connection
  30: Client using the binary protocol
  &lt;30 Read binary protocol data:
  &lt;30    0x80 0x0c 0x00 0x28
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x28
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30 GET memc.sess.key.9bn8cdu9c1j7ko1tmflgr433k1
  &gt;30 Writing bin response:
  &gt;30   0x81 0x0c 0x00 0x28
  &gt;30   0x04 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x03 0xc6
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &lt;30 Read binary protocol data:
  &lt;30    0x80 0x01 0x00 0x28
  &lt;30    0x08 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x03 0xcb
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30 SET memc.sess.key.9bn8cdu9c1j7ko1tmflgr433k1 Value len is 923
  &gt;30 Writing bin response:
  &gt;30   0x81 0x01 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x05
  &lt;30 Read binary protocol data:
  &lt;30    0x80 0x07 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x00
  &lt;30    0x00 0x00 0x00 0x00
  &gt;30 Writing bin response:
  &gt;30   0x81 0x07 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &gt;30   0x00 0x00 0x00 0x00
  &lt;30 connection closed.
  </code></pre>
  
  <p>However the second server just gets connects/disconnects, but nothing is stored:</p>
  
  <pre><code>&lt;30 new auto-negotiating client connection
  30: Client using the ascii protocol
  &lt;30 quit
  &lt;30 connection closed.
  </code></pre>
  
  <p>So as soon as you kill the first server sessions are lost an there is no failover.</p>
  
  <p>Anyone know what's going on here?</p>
  
  <p>Edit:</p>
  
  <p>We created a few sessions in different browsers, it looks like the keys are being distributed, but not replicated.</p>
  
  <p>Server 1:</p>
  
  <pre><code>stats cachedump 12 100
  ITEM memc.sess.key.80iie5lhm36mddkekdk488q923 [922 b; 1406287763 s]
  </code></pre>
  
  <p>Server 2:</p>
  
  <pre><code>stats cachedump 12 100
  ITEM memc.sess.key.ehd1nsm6icc2qsotbkcp8i9sd7 [874 b; 1406287898 s]
  ITEM memc.sess.key.d3p0id333ggbd0004n4rcc4890 [875 b; 1406287868 s]
  ITEM memc.sess.key.7hek9e2aakgqv9sm2bcq5fbfb3 [922 b; 1406287842 s]
  </code></pre>