Words of wisdom about using the Memcached UDP protocol?

Iain Wade iwade at optusnet.com.au
Wed Jan 31 06:53:57 UTC 2007


> 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've been using memcached UDP across 30 clients averaging 300
processes each for some months.

I don't think memcached server has a problem handling 10's of
thousands of connections (if using epoll anyway), but I didn't want
the TCP connect overhead when the processes cycled very quickly.

I wrote my own very basic Cache::Memcached::UDP module (attached).

I'm using a patched memcached 1.2.0 (see my previous list post,
attached again), it was a simple fix for UDP set requests; not sure if
it was merged or not.

In my view the UDP support is still quite hacky,and doesn't really
support sending multiple requests in the one packet (it results in
multiple response streams with overlapping ids).

But it works well enough for me.

--Iain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memcached-1.2.0-udp_fix.patch
Type: application/octet-stream
Size: 547 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/memcached/attachments/20070131/a7ecfd0e/memcached-1.2.0-udp_fix.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UDP.pm
Type: text/x-perl-script
Size: 3638 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/memcached/attachments/20070131/a7ecfd0e/UDP.bin


More information about the memcached mailing list