<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 14:25, Alex Stapleton wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV>Hi Russ ;)</DIV><DIV><BR class="khtml-block-placeholder"></DIV>Very short timeouts and machine local status tables (in memcached / turckmmcache / eaccelerator / whatever you want ) seem to produce pretty reliable fail over for us. Throw in some timeout's and register_shutdown_functions()s to recheck the server periodically and it actually starts to get pretty nice.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>As long as your connect() time-out is low enough to merely make it look like the page took slightly longer than normal to load, you shouldn't have anything to worry about. It means you have a higher potential for false positives but we haven't had any of those yet with our time-out set to 500 ms.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Even if you use something which has a habit of forgetting about keys (e.g. turck) it's not too painful as the failed connection attempt ratio still tends to stay low enough to not be particularly noticeable.<DIV><DIV><DIV><BLOCKQUOTE type="cite"></BLOCKQUOTE></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV><FONT class="Apple-style-span" color="#006312"><BR class="khtml-block-placeholder"></FONT><DIV><FONT class="Apple-style-span" color="#006312">It *is* you...</FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312">No chance on going open-source on your code then? Or I'll have to do it myself... Someone's got to do it sooner or later.</FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312">I was somewhat resigned to doing it myself in the end, but I completely forgot about eaccelerator as a means of local shared memory.</FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312">I'm certainly not going back to a libmemcache-based solution in a hurry after the amount of grief it's caused me over the various times I've tried it.</FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312">Russ</FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312"><A href="mailto:russ@last.fm">russ@last.fm</A></FONT></DIV><DIV><FONT class="Apple-style-span" color="#006312"></FONT></DIV></BODY></HTML>