The client should use a hashing algorithm on the key, and if both instances
of memcached are in the available pool of servers, then once hashed, it will
decide on the server and then always go to that server, unless of course it
is taken out of the pool of available servers.

You can test this out more easily by spinning up several instances of
memcached on a server and configuring and working with your client.

Which client are you using?

Kevin

On Thu, Oct 30, 2008 at 12:58 PM, TheJonathan <[EMAIL PROTECTED]> wrote:

>
> Hi all,
>
> I'm really excited to start using memcached.  I'm currently using in-
> memory caches in my ASP.NET+IIS6 application on 2 load-balanced
> servers, but of course that isn't a shared memory between the 2
> servers.  So if key "test1" is cached on web1, web2 has no way of
> getting to it.  Enter memcached.
>
> One question I had, since I have those 2 servers (and 1 separate db) I
> want to install the memcached server on both of them since the
> database is the bottleneck, not the RAM on the servers.  If I do that,
> how does memcached figure out which server has the cache key
> efficiently?  I am missing something?  For example, say web1 is
> configured to use memcached on localhost+web2, and web2 is configured
> to use memcached on localhost+web1.  If a key is created on web1 or
> web2, will it always be stored in the same cache?
>
> Thanks for your help!
>
> --Jonathan

Reply via email to