locator servers for memcache

Harrison Fisk harrison@mysql.com
Thu, 18 Dec 2003 22:21:52 -0500 (EST)


Hi Brad,

The MLS idea seems like a possible decent one.  It sounds very similar to
some clustering solutions I know of, though I do have a few questions for
you.

How would you handle dealing with keeping the MLS's in sync?  Without them
being moderately insync you get the same problem you have with individual
clients.  Once you start getting into keeping many servers all in sync,
you need to handle race conditions and start having a need for something
like 2-phase commit. Of course you could just choose not to handle race
conditions at the expense of some clients getting very badly desync'd from
other ones, which wouldn't be a good thing.  This could be particular bad
if servers kept going up and down very rapidly (like what could happen
during a network issue).

The question is, do you want to add all of the complexity that this would
require?  Syncronization is not a very trivial thing.

What is wrong with the idea of forcing the clients to all use the same
hashing alogrithm?  While they could still get out of sync a bit, it seems
not that dissimilar from what could happen without syncronizing your
MLS's.  I haven't used memcached in that large of an environment, so I am
not sure if this is a big issue or not.

Keep in mind I don't know all of the internals of memcached, so just let
me know if I have missed something obvious.

On Wed, 17 Dec 2003, Brad Fitzpatrick wrote:

> Avva and I were talking today about the memcached coherency problem after
> clients do rehashing (often out of sync with each other).
>
> One solution (which is lame), is to disable hashing in the client.  The
> Perl API supports that, but performance would suck.  The alternative also
> sucks, which is things getting all out of sync.
>
> We think we've come up with a solution.  Chat log:
>
<<cut>>

Regards,

Harrison

-- 
Are you MySQL certified? -- http://www.mysql.com/certification
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Harrison Fisk <harrison@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Trainer and Consultant
/_/  /_/\_, /___/\___\_\___/   Binghamton, NY,  USA
       <___/   www.mysql.com   Cell: +1 315 380 6048