memcached and distribution or assignment

I have been using Memcached in a lot of different type of caching solutions for web services and thought of sharing some basic facts,

  1. Memcached servers are just very efficient key value storage providing APIs to get and set values over the network.
  2. Client makes the solution distributed. The client has the logic to select or choose the destination host for get or set operation using consistent hashing.
  3. The memcached client library supports a number of different distribution algorithms that are used in multi-server configurations. Please read the protocol.
  4.  The cache key is used in the consistent hashing to determine distrubution. The same server is selected during both set and get operations. The algorithms are Ketama and Wheel in code.
  5. following diagram is for simplicity in understanding the process.

Untitled Diagram

In the next post, I will show how to use Guava and Memcached together to implement a multi layered caching solution.

Advertisements

About yadab das
Software Developer{writing,debugging,documenting} source code

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: