Replication

Clint Webb webb.clint at gmail.com
Wed Oct 24 01:37:38 UTC 2007


The problem with a replicated cache is figuring out what to do if one
fails.  Memcached effectively solves this problem by not doing replication.
I strongly agree with this approach unless you have a VERY good reason not
to, and in that case, memcached is probably not a very good choice.

What I recommend is using multiple memcached caches, even if all your cached
data can fit in one instance, spread it over several.  That way if you need
to stop one instance for any reason, you dont lose your whole cache, you
only lose part of it, which can be recreated from the database.

One of my smaller projects has a finite set of data that is only about 20mb
in size, it will change frequently, but not get any larger or smaller.  I
actually use two memcached instances on different machines (each with 20mb
allocated),  and the keys are distributed over both (by the client).

This has worked quite adequately for me for small and large projects.

Replication sounds like a simple thing, but in implementing it, there are a
LOT of things that become issues.

On 10/24/07, Marcus Bointon <marcus at synchromedia.co.uk> wrote:
>
> On 23 Oct 2007, at 20:17, Brian Beuning wrote:
>
> > One instance of memcached could handle our tiny 400 MB with no
> > problem.
> > It can probably even handle the load of 100 processes hitting it.
> > But I am
> > concerned if memcached went down then we would miss our fixed time
> > window.
> >
> > Ideally we would like to have a few memcached instances each with a
> > full
> > copy of the 400 MB.  The Wiki says memcached does not do replication.
>
> Seems like the memcachedb project mentioned on here recently might be
> a good fit for you. It's essentially a memcache front-end with a bdb
> back end, so can survive restarts etc, while still serving some scary
> performance numbers.
>
> Marcus
> --
> Marcus Bointon
> Synchromedia Limited: Creators of http://www.smartmessages.net/
> UK resellers of info at hand CRM solutions
> marcus at synchromedia.co.uk | http://www.synchromedia.co.uk/
>
>
>


-- 
"Be excellent to each other"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071024/33dc3158/attachment.htm


More information about the memcached mailing list