pymemcache icon indicating copy to clipboard operation
pymemcache copied to clipboard

Add support for the binary protocol

Open sontek opened this issue 9 years ago • 10 comments

https://github.com/memcached/memcached/wiki/BinaryProtocolRevamped

The binary protocol is much faster than the text protocol:

http://www.erikwebb.net/blog/benchmarking-memcached-memslap/

pylibmc already supports this with binary=True

Outside of performance this also allows set_multi to be a real performant call instead of a ton of individual calls.

sontek avatar Jun 20 '15 06:06 sontek

In addition to being faster, the binary protocol is required if using SASL auth (eg with a cloud memcached offering such as Memcachier or Memcached Cloud).

Both pylibmc and python-binary-memcached support the binary protocol, and thus SASL auth.

edmorley avatar Aug 19 '16 11:08 edmorley

I was actually looking at this just the other day. I'll need to spend some time on it, but I think this would be a nice feature to add.

jparise avatar Aug 19 '16 21:08 jparise

We use mcrouter extensively at Pinterest, and it unfortunately doesn't support the binary protocol (facebook/mcrouter#6). That makes it less of a priority for us (internal-development-wise), but we'd be happy to accept a patch!

jparise avatar Aug 26 '16 18:08 jparise

Hey there, just noting that some of your links in this thread are broken (e.g. https://code.google.com/p/memcached/wiki/MemcacheBinaryProtocol in @sontek 's post and @jparise 's mcrouter link)

simonzheng avatar Apr 13 '17 20:04 simonzheng

@simonzheng: I fixed my link. Thanks!

jparise avatar Apr 13 '17 21:04 jparise

I can fix mine tonight

sontek avatar Apr 13 '17 21:04 sontek

While it's probably still worth implementing for folks who do use it, the Binary protocol is actually deprecated in favor to the new Meta protocol

https://github.com/memcached/memcached/wiki/ReleaseNotes160

derekargueta avatar Mar 18 '20 21:03 derekargueta

Will this ever be revisited? pymemcache seems like the best library by far, but we can't use it with Heroku + Memcachier without binary protocol support.

ferndot avatar Sep 29 '21 19:09 ferndot

Hi @joshua-s, we are happy to merge in a pull request for binary protocol support. As @jparise previously mentioned we wouldn't be able to use it ourselves which is why we haven't implemented it already.

jogo avatar Sep 30 '21 15:09 jogo

:heavy_plus_sign: for this feature

damjankuznar avatar Oct 27 '22 09:10 damjankuznar