memcached.asciidoc 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. [[modules-memcached]]
  2. == memcached
  3. The memcached module allows to expose *Elasticsearch*
  4. APIs over the memcached protocol (as closely
  5. as possible).
  6. It is provided as a plugin called `transport-memcached` and installing
  7. is explained
  8. https://github.com/elastic/elasticsearch-transport-memcached[here]
  9. . Another option is to download the memcached plugin and placing it
  10. under the `plugins` directory.
  11. The memcached protocol supports both the binary and the text protocol,
  12. automatically detecting the correct one to use.
  13. [float]
  14. === Mapping REST to Memcached Protocol
  15. Memcached commands are mapped to REST and handled by the same generic
  16. REST layer in Elasticsearch. Here is a list of the memcached commands
  17. supported:
  18. [float]
  19. ==== GET
  20. The memcached `GET` command maps to a REST `GET`. The key used is the
  21. URI (with parameters). The main downside is the fact that the memcached
  22. `GET` does not allow body in the request (and `SET` does not allow to
  23. return a result...). For this reason, most REST APIs (like search) allow
  24. to accept the "source" as a URI parameter as well.
  25. [float]
  26. ==== SET
  27. The memcached `SET` command maps to a REST `POST`. The key used is the
  28. URI (with parameters), and the body maps to the REST body.
  29. [float]
  30. ==== DELETE
  31. The memcached `DELETE` command maps to a REST `DELETE`. The key used is
  32. the URI (with parameters).
  33. [float]
  34. ==== QUIT
  35. The memcached `QUIT` command is supported and disconnects the client.
  36. [float]
  37. === Settings
  38. The following are the settings the can be configured for memcached:
  39. [cols="<,<",options="header",]
  40. |===============================================================
  41. |Setting |Description
  42. |`memcached.port` |A bind port range. Defaults to `11211-11311`.
  43. |===============================================================
  44. It also uses the common
  45. <<modules-network,network settings>>.
  46. [float]
  47. === Disable memcached
  48. The memcached module can be completely disabled and not started using by
  49. setting `memcached.enabled` to `false`. By default it is enabled once it
  50. is detected as a plugin.