Failover

Brian Beuning BBeuning at corecard.com
Fri Nov 30 15:20:32 UTC 2007


Thanks for the correction.
 
Brian Beuning

-----Original Message-----
From: Ask Bjørn Hansen [mailto:ask at develooper.com]
Sent: Thursday, November 29, 2007 12:03 PM
To: Brian Beuning
Cc: Jeff Rooney; memcached at lists.danga.com
Subject: Re: Failover



I thought Dynamo could use a number of backends (bdb, mysql, in memory in
the server) with bdb as the default...

--  
http://develooper.com <http://develooper.com> 

On Nov 28, 2007, at 10:50, Brian Beuning < BBeuning at corecard.com
<mailto:BBeuning at corecard.com> > wrote:



The FAQ has some advice for caching sessions.
 
The usual answer is memcached makes your app fast,
but it does not make your app reliable or the data resilient.
With memcached you usually want to store your data
on disk (maybe in a DB Server) and then use code like:
1. Check in memcached, if found use it
2. If not found, look on disk
3. If found on disk, use it and store it in memcached
4. When data changes, save it to disk and in memcached
 
Some people build their own reliability layer on top
of memcached.  For example, you could treat your
3 machines as separate caches each with all cached
data.  Then your app can look for data in any of the 3
machines.  When you find data on disk, you would
save the data on all 3 machines.  This is new logic in
your app above the memcached client layer.
 
In general you would decide how many machines to store
all data on based on the availability you need.  Storing a
copy on 2 machines is a huge step up from just 1 copy.
Storing 3 copies is for the truly paranoid.
 
Someone just released a version of memcached that
replicates cached data on 2 machines.  That way if
one machine goes down, the other still has a copy.
Look back in the archives for the release announcement.
(Around 11/5/2007.)
 
The people at Amazon have something called Dynamo
that does what you want but it is not available outside.
It stores data just in memory on multiple machines and
a machine going down has very small odds of losing data.
If you read the paper, you will see the issues involved.
 
Brian Beuning
 
 

-----Original Message-----
From: Jeff Rooney [mailto: jtrooney at nexdlevel.com
<mailto:jtrooney at nexdlevel.com> ]
Sent: Monday, November 19, 2007 1:40 PM
To:  <mailto:memcached at lists.danga.com> memcached at lists.danga.com
<mailto:memcached at lists.danga.com> 
Subject: Failover


Hi everyone,

I have been playing with memcache a little and am looking to use it for
centralized session storage but have a question.

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. 

Thanks in advance.

-- 
Jeff Rooney
 <mailto:jtrooney at nexdlevel.com> jtrooney at nexdlevel.com
<mailto:jtrooney at nexdlevel.com>  


No virus found in this incoming message.
Checked by AVG.
Version: 7.5.503 / Virus Database: 269.16.10 - Release Date: 11/29/2007


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071130/faadd659/attachment.html 


More information about the memcached mailing list