Hi! My first post
Jason Edgecombe
jason at rampaginggeek.com
Mon Jul 16 22:36:25 UTC 2007
P R E M wrote:
> Hi,
>
> Hi, I am Prem and this is my first mail to this forum. I am trying to use memcached for my web-application and have few questions.
>
> How is distributed caching achieved in a grid setup ? especially when I run more than one application server in a grid.
>
> Based on my understanding, each app-server will run its own client and each will maintain its own hash to map the server to the client request.
> How will all the client synch this hash data ??
> Or do I have to run the client as a separate instance , kind of virtual server and direct requests from all app-servers to it, which will inturn maintain a hash map through which it identifies the server containing the data using a key ?
>
> If I am not clear, please get back to me.
>
> Regards,
> Prem
Hi Prem,
In a typical scenario with multiple memcached servers, each piece of
data is cached on one and ONLY one server. The client knows which server
to ask based on the hash of the key being requested. The map of the hash
to the server is based on the server list. Each client uses the correct
server for each piece because each client uses the same hash algorithm
against the same server list with servers listed in the same order. If a
server is removed from the server list or the list is reordered, then
the clients will not talk to the correct server to fetch the data. This
will result in two copies of the data with one being an older copy.
I hope this answers your question.
Sincerely,
Jason
More information about the memcached
mailing list