<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 6 Sep 2005, at 13:18, Antony Dovgal wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Not precisely true.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">See this pseudo-code:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><?php</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">$first_server = new Memcache(...);</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">$second_server = new Memcache(...);</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">$third_server = new Memcache(...);</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">$fourth_server = new Memcache(...);</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">?></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Nothing prevents you from using as much servers as you want in the same time.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I'm a strong believer that it's better to write couple of lines in PHP and have 100% flexible API then to hardcode some logics into the extension and have to work around it every time to get the desired behaviour.</DIV></BLOCKQUOTE><BR></DIV><DIV>This is what we do at the moment, but the main issue with this is that there's no failover. In order to implement proper failover you'd need to detect when a server has died and record that fact in shared memory (which PHP doesn't have reliably, which is why we're using memcached in the first place), so you don't have to attempt to connect to a dead server every time. This is a big pain. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>We don't do proper failover at present (if one of our web nodes dies, our site is unusable), which is why we were looking to use the mcache extension to implement it. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Russ Garrett</DIV><DIV><A href="mailto:russ@last.fm">russ@last.fm</A></DIV><FONT class="Apple-style-span" color="#0000DD"></FONT></BODY></HTML>