Can two MemCached clients set the <key,value> pairs in Memcached servers in parallel?

6 views
Skip to first unread message

Shrav

unread,
Dec 9, 2008, 3:46:24 PM12/9/08
to memcached
Hi,
I have started memcached servers on 5 nodes and assigned 1GB
memory to each server. Now, I have two MemCached java clients and I
connect to all the 5 memCached servers from each of them. The first
java client tries to set some of the <key,value> pairs in the memcache
server and the second java client tries to set other <key,value> pairs
distinct from the ones being set by the first memcached java client.
This task is being done in parallel and I notice that keys are not
being set correctly.
Suppose we have 3 memcached servers : s1,s2,s3
2 memcached clients: m1,m2

Can both m1 and m2 set some <key,value> pairs in the memcached
servers in parallel?

I have noticed that many values are being set to null when I am
trying to do this operation. Kindly let me know what could be the
problem.

Thanks.
Shrav

Josef Finsel

unread,
Dec 9, 2008, 4:06:57 PM12/9/08
to memc...@googlegroups.com
Shrav,

Can I ask, first, what you are attempting to do by having 2 sets of memcached servers instead of 1?

Thanks

Josef
--
"If you see a whole thing - it seems that it's always beautiful. Planets, lives... But up close a world's all dirt and rocks. And day to day, life's a hard job, you get tired, you lose the pattern."
Ursula K. Le Guin

http://www.finsel.com/words,-words,-words.aspx (My blog) - http://www.finsel.com/photo-gallery.aspx (My Photogallery)  -http://www.reluctantdba.com/dbas-and-programmers/blog.aspx (My Professional Blog)

Shrav

unread,
Dec 9, 2008, 4:53:49 PM12/9/08
to memcached
Hey Josef,
I have 3 memcache servers and 2 memcached clients. I
am trying to use 2 memcached clients in parallel and set the
<key,value> pairs in the servers in parallel. The only reason for
doing this is that my file is really huge and I want the values to be
set in the memcache server quickly. Thats the whole purpose of trying
to set the <key,value> pairs in parallel.

Thanks.
Shravya

Josef Finsel

unread,
Dec 9, 2008, 5:20:06 PM12/9/08
to memc...@googlegroups.com
Well, my first thought is, depending on your client, make sure the servers are listed in the same order, some clients use the order of the server list to determine where to store keys.

I'm also curious as to why you are trying to preload the cache.

Josef

Clint Webb

unread,
Dec 9, 2008, 6:57:17 PM12/9/08
to memc...@googlegroups.com
And don't use localhost or 127.0.0.1 in your server list, which seems to be something people like to do, but makes no sense in a cluster.
--
"Be excellent to each other"
Reply all
Reply to author
Forward
0 new messages