I followed everyone's suggestions in here and didn't use localhost
after-all. web1 and web2 both use the server settings: 192.168.1.1
and 192.168.1.2 (in that order). Works like a charm ;)
On Oct 31, 9:55 am, "Clint Webb" <
webb.cl...@gmail.com> wrote:
> Are you sure? When hashing the key, to determine which server to send it
> to, on some machines it will put key 'foo' on server web3, but on web3 it
> will put it on localhost?
>
> It just doesn't seem like good practice to me to access a member of a
> cluster by using localhost, when other clients will be accessing it
> differently. Especially if you do like I do and have a single config file
> that is rsynced to all the cache servers.
>
> I'm not sure I see what actual gain you get by using localhost.
>
>
>
> On Fri, Oct 31, 2008 at 7:48 PM, Henrik Schröder <
skro...@gmail.com> wrote:
> > On Thu, Oct 30, 2008 at 9:26 PM, TheJonathan <
mitc...@gmail.com> wrote:
>
> >> I think I get it. So if I'm passing in the array of memcached IPs via
> >> a web.config, make sure they are in the same order on all load-
> >> balanced machines. e.g.
> >> web1 = localhost, web2
> >> web2 = web1, localhost
>
> > As long as you use the same names everywhere you will be fine. If you were
> > using my client, it can take either "host", "ip", "host:port" or "ip:port"
> > when you setup the list, and it will then use those strings that you supply
> > as the basis for the server mapping algorithm, so those strings have to be
> > the same in all clients. You could for example configure it with
> > "localhost", "localhost:11211" and "127.0.0.1", and it would treat that as
> > three different servers, although the lookup for all three returns the same
> > ip and port.
>
> > @Kevin: Is the hashing algorithm you mentioned something I would have
> >> to implement myself, or a feature? I was going to use the enyim
> >> Memcached client in .NET 2.0
http://www.codeplex.com/EnyimMemcached/