I have memcache server listing on I have to query the memcached server from the same box. Which one do you think is better: querying from or from interface-ip:11211. Please explain why also ?


I have to query the memcached server from the same box.

Why not use Unix socket to avoid TCP/IP overhead:

$ memcached -h
memcached 1.2.8
repcached 2.2
-p <num>      TCP port number to listen on (default: 11211)
-U <num>      UDP port number to listen on (default: 11211, 0 is off)
-s <file>     unix socket path to listen on (disables network support)

See also: Unix domain sockets vs TCP Sockets

  • The thing is that i am configuring graphite to use memcached.. which can only use tcp/ip sockets. – pradeepchhetri Mar 11 '13 at 9:07

querying to is better as compared to querying memcached on interface ip.

  • 3
    Please justify your answer with proper reasons – pradeepchhetri Mar 11 '13 at 8:36
  • 3
    Not a complete answer - the question specifically asks "please explain why also". – Jenny D Mar 11 '13 at 10:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.