Words of wisdom about using the Memcached UDP protocol?

EKC webmaster at generalsynthesis.com
Wed Jan 31 03:04:00 UTC 2007


Hello,

I've got 200 preforked http daemons (light weight http server written
in Perl) running on each of 5 servers in a memcached pool.  I'm
planning on upping that to 13 servers and 300 http daemons per server
(quad core opteron systems).

Needless to say, I am starting to worry about the saneness of keeping
all of those connections open for memcached (300*13*13 = 50,700 TCP
connections). I was perusing the Memcached protocol doc at
http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt
and the description of the UDP protocol caught my eye.

I can rewrite my app to tolerate some datagram loss. Tornado codes are
an option, too. I'm a bit worried about network congestion, but I
suppose I could tweak some switch settings to deal with that.

However, is anyone actually using Memcached over UDP in a large scale
deployment? If so, are you still using TCP for set requests, or have
you moved over to UDP entirely? I recall reading that Facebook uses
memcached and I'm guessing they may have though about using UDP, too.
Any words of wisdom?

I'm using the perl API which does not seem to support UDP, so I will
have to do a fair bit of refactoring to move over to UDP.

Finally, which branch of the Memcached server daemon should I be using
if I'm going to be using UDP? I head about a multithreaded version of
the memcached daemon. Should I move over to that or is the overhead
not worth it?
...
I'm using memcached 1.1.13-pre from
http://code.sixapart.com/svn/memcached/branches/facebook/

Thanks in advance!


More information about the memcached mailing list