The server selection method is usually called "consistent hashing" or "ketama" after the first implementation in a memcached client. Read more here:
http://www.audioscrobbler.net/development/ketama/ or here: http://en.wikipedia.org/wiki/Consistent_hashing As for procedure.. uhh.. configure your client to use it? That's it. If you use consistent hashing, and if you have N servers, adding one more server to your pool will cause 1/(N+1) keys to be remapped to the new server, and the remaning keys will not be remapped. That's the absolute best case if you want symmetric use of your servers. /Henrik On Wed, Feb 3, 2010 at 10:07, nEosAg <[email protected]> wrote: > Hey Brian, > > could you please elaborate more on consistent hashing, is there any > algorithm or standard practise available to follow in a case where we > need to add server, without/close-to-negligible remapping of keys? > > Thanks. > > -sag > > > On Feb 2, 10:00 pm, Brian Aker <[email protected]> wrote: > > Hi! > > > > On Jan 28, 2010, at 10:06 PM, nEosAg wrote: > > > > > 1. If i changed my Hashing policy to "consistent" then what will be > > > the impact on code, memecache Data etc. > > > > pecl/memcache uses CRC/modular, while libmemcached by default will use > "one-at-a-time"/Modula by default. If you switch to crc then the two > libraries should be compatible. The CRC is based on the code found in > Postgres. > > > > If you use "consistent" then the two will not map at all (well... by > chance). > > > > Cheers, > > -Brian >
