<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV><SPAN class=466251615-30112007><FONT face=Arial color=#0000ff size=2>Thanks
for the correction.</FONT></SPAN></DIV>
<DIV><SPAN class=466251615-30112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=466251615-30112007><FONT face=Arial color=#0000ff size=2>Brian
Beuning</FONT></SPAN></DIV></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Ask Bjørn Hansen
[mailto:ask@develooper.com]<BR><B>Sent:</B> Thursday, November 29, 2007 12:03
PM<BR><B>To:</B> Brian Beuning<BR><B>Cc:</B> Jeff Rooney;
memcached@lists.danga.com<BR><B>Subject:</B> Re: Failover<BR><BR></FONT></DIV>
<DIV><BR class=webkit-block-placeholder></DIV>
<DIV>I thought Dynamo could use a number of backends (bdb, mysql, in memory in
the server) with bdb as the default...<BR><BR>--
<DIV><A href="http://develooper.com">http://develooper.com</A></DIV></DIV>
<DIV><BR>On Nov 28, 2007, at 10:50, Brian Beuning <<A
href="mailto:BBeuning@corecard.com">BBeuning@corecard.com</A>>
wrote:<BR><BR></DIV>
<DIV></DIV>
<BLOCKQUOTE type="cite">
<DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>The FAQ has some advice for caching sessions.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>The usual answer is memcached makes your app
fast,</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>but it does not </FONT></SPAN><SPAN class=497051618-28112007><FONT
face=Arial color=#0000ff size=2>make your app reliable or the data
resilient.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>With memcached you usually want to store your
data</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>on
disk (maybe in a DB Server) and then use code like:</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>1.
Check in memcached, if found use it</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>2.
If not found, look on disk</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>3.
If found on disk, use it and store it in memcached</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>4.
When data changes, save it to disk and in memcached</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>Some people build their own reliability layer on
top</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>of
memcached. For example, you could treat your</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>3
machines as separate caches each with all cached</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>data. Then your app can look for data in any of the
3</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>machines. When you find data on disk, you
would</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>save the data on all 3 machines. This is new logic
in</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>your app above the memcached client layer.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>In
general </FONT></SPAN><SPAN class=497051618-28112007><FONT face=Arial
color=#0000ff size=2>you would decide how many machines to
store</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>all data </FONT></SPAN><SPAN class=497051618-28112007><FONT
face=Arial color=#0000ff size=2>on based on the availability you
need. Storing a</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>copy on 2 machines is a huge step up from just 1
copy.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>Storing 3 copies is for the truly paranoid.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>Someone just released a version of memcached that</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>replicates cached data on 2 machines. That way
if</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>one machine goes down, the other still has a
copy.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>Look back in the archives for the release
announcement.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>(Around 11/5/2007.)</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>The people at Amazon have something called Dynamo</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>that does what you want but it is not available
outside.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>It
stores data just in memory on multiple machines and</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>a
machine going down has very small odds of losing data.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff size=2>If
you read the paper, you will see the issues involved.</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2>Brian Beuning</FONT></SPAN></DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=497051618-28112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Jeff Rooney [mailto:<A
href="mailto:jtrooney@nexdlevel.com">jtrooney@nexdlevel.com</A>]<BR><B>Sent:</B>
Monday, November 19, 2007 1:40 PM<BR><B>To:</B> <A
href="mailto:memcached@lists.danga.com"><A
href="mailto:memcached@lists.danga.com">memcached@lists.danga.com</A></A><BR><B>Subject:</B>
Failover<BR><BR></FONT></DIV>Hi everyone,<BR><BR>I have been playing with
memcache a little and am looking to use it for centralized session storage
but have a question.<BR><BR>My current setup has 3 servers running the
memcache daemon with 2 frontend web servers. As part of storing the
sessions I create a memcache connection pool containing all 3 of the
backend servers and store the session data, so far so good. Where my
problem comes into play is if one of the memcache daemons fails all
session data held within that server is lost, is there anyway to have a
set up data stored on multiple servers based on the same key? If a daemon
dies I would prefer to not lose all active sessions contained on that
system if at all possible. <BR><BR>Thanks in advance.<BR clear=all><BR>--
<BR>Jeff Rooney<BR><A href="mailto:jtrooney@nexdlevel.com"><A
href="mailto:jtrooney@nexdlevel.com">jtrooney@nexdlevel.com</A></A>
</BLOCKQUOTE></DIV></BLOCKQUOTE><BR>
<P><FONT size=2>No virus found in this incoming message.<BR>Checked by
AVG.<BR>Version: 7.5.503 / Virus Database: 269.16.10 - Release Date:
11/29/2007<BR></FONT></P></BLOCKQUOTE></BODY></HTML>