Distributed Network Syncing
jcoene at gotfrag.com
Mon Aug 8 15:26:19 PDT 2005
Additionally, regarding the following:
"This bad data seems to propogate across the network until I have to bring
all 3 memcache servers down, then start one, hit the correct webpages to
prime my data, and then start the other two memcache servers back up."
First, One memcached server has no way of affecting the others in any way,
what you're experiencing is certainly a result of the logic in your
Second, it sounds like you're relying upon Memcached as a database, where if
it fails to return the data you need the whole operation comes grinding to a
halt. This is bad practice. Try the following process:
- Try memcached for data you need
- If succeeds, use cache data.
- If fails, hit database and store result in cache.
- The next client will get data from the cache.
Of course, it's never this simple to implement, but this is the conventional
logic among many memcached users.
If implemented this way you'll never be unable to deliver data so long as
your database server is up. A memcached server can fail, and your software
will simply get the data from the database instead. It works very well.
> -----Original Message-----
> From: memcached-bounces at lists.danga.com [mailto:memcached-
> bounces at lists.danga.com] On Behalf Of Ivan Krstic
> Sent: Monday, August 08, 2005 5:21 PM
> To: jesse at blastro.com
> Cc: memcached at lists.danga.com; Casey Charvet
> Subject: Re: Distributed Network Syncing
> Jesse Brede wrote:
> > My question is: How does memcache sync data entries in a distributed
> > network?
> It doesn't. It's not a database.
> > Is there something that I need to do to resync the servers
> > correctly when one has gone down.
> The servers don't sync - the client decides, based on hashing, on which
> server to store a particular key/value pair.
More information about the memcached