Great system.. two questions though..

Allen memcached at rfnj.org
Thu Mar 30 16:07:52 UTC 2006


Quoting Brian Moon <brianm at dealnews.com>:

>> Question one is sort of silly, or struck me as silly anyway.. When I try
>
> That looks normal to me, but I am not familiar with the perl client 
> and what the significance of the : is.  So I will let someone else 
> answer that.

I got that from the examples provided.. It's not a perl thing, and I'm 
not certain if it has any significance either, but documentation is 
sparse.

The examples show it being used though.

http://www.danga.com/memcached/ -- scroll down to "Perl Example".  I'd 
imagine it's just there to provide a sort of namespace for different 
applications so there isn't a collision.

>> Question two is more of an architechtural one.  If I define multiple 
>> servers in the Memcached object, and do a set(), does it update the 
>> value on ALL the backend servers, pick one at random, or what?
> >
> > Likewise if you get() in that situation, does it try all the servers
> > before failing, or is there some other system at play here?
>
> In both cases, the perl client uses an algorithm to select a server 
> based on the key you have provided.  As long as the server list stays 
> the same, the client will select the same server for the same key.  
> If the server can not be reached, the client then chooses another 
> server from the pool.

I see.  So if the server chosen by the algorithm during the set() goes 
down later, the get() will try all the other servers before failing -- 
though it will likely fail at least the first time, since the set() 
only put it in one place.

Thanks for the insight.





More information about the memcached mailing list