Protocols

Protocols

Memcached supports a basic Text and Meta Text protocol. There is also a deprecated “binary” which no longer receives updates. The Meta protocol is more efficient than the older binary protocol, is cross compatible with the Text protocol. It is recommended for all new clients.

Further, there are sub protocols and proposals

Why is the binary protocol deprecated?

The binary protocol was introduced in 2008. It seemed like a good idea but it had many issues:

  • Security issues
  • Poor efficiency prevented adoption by large users
  • Limited features and poor extensibility
  • SASL authentication rarely worked and caused a lot of support headaches.
  • Difficult to implement as a client.

We introduced the meta protocol in 2019:

  • Better wire efficiency
  • More features (anti-stampeding herd, stale-while-revalidate, etc)
  • Small command set (get/set/delete/math)
  • Extensible (flags and tokens)
  • Simple and easy to implement

More information can be found in protocol.txt linked above.