Issue 336 in memcached: Allow listening on both TCP/UDP port and Unix sockets

339 views
Skip to first unread message

memc...@googlecode.com

unread,
Aug 5, 2013, 3:22:18 PM8/5/13
to memc...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 336 by drog...@sugarinc.com: Allow listening on both TCP/UDP port
and Unix sockets
http://code.google.com/p/memcached/issues/detail?id=336

What steps will reproduce the problem?
1. Start memcached with -s <socket> and -p <port>
2. Try to connect to port 11211
3. Be surprised when you can't.

What is the expected output? What do you see instead?

I'd expect to still be able to connect with TCP even when using Unix
sockets. (Yes, it is documented that it doesn't work this way, but I was
still surprised.)

What version of the product are you using? On what operating system?

1.4.13 on Amazon Linux

Please provide any additional information below.

It would be really nice to be able to combine the efficiency of Unix
sockets (for local connections) with the flexibility of TCP connections
(for remote connections). However, enabling Unix sockets currently
disables network support.

Would it be difficult to allow both if both -s and -p are provided?

Benchmark speed comparison for local connections:

TCP to 127.0.0.1 port 11211:

[RUN #1, 16 secs] 0 threads: 2000000 ops, 125000 ops/sec,
5.07MB/sec, 1.64msec latency

Unix socket:

[RUN #1, 14 secs] 0 threads: 2000000 ops, 142857 ops/sec,
5.79MB/sec, 1.40msec latency

Thanks!

Dan.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

memc...@googlecode.com

unread,
Oct 10, 2013, 12:40:59 PM10/10/13
to memc...@googlegroups.com

Comment #1 on issue 336 by nrodrig...@jbox-web.com: Allow listening on both
Hi!

It would be have nice to have this feature.
I use Collectd to graph Memcached utilization and it's nicer to use socket
to do that rather than use IP:PORT.

Thanks!

memc...@googlecode.com

unread,
Dec 8, 2013, 10:13:31 PM12/8/13
to memc...@googlegroups.com

Comment #2 on issue 336 by dorma...@rydia.net: Allow listening on both
This is generally a bad idea... We don't let people do this because then
they start distributing client lists where one is set to localhost instead
of the interface IP, which changes the map on each client, which means
their shit gets all messed up.

Maybe we'll allow an override, but I got really sick of people
reporting "bugs" where they were doing the lists in weird ways. They're
still able to do that with 127.0.0.1 though...

Bleh, dunno.

memc...@googlecode.com

unread,
Dec 20, 2013, 3:54:39 AM12/20/13
to memc...@googlegroups.com
Updates:
Status: WontFix

Comment #3 on issue 336 by dorma...@rydia.net: Allow listening on both
Going to close this... it sounds like a nice idea but there aren't any
clients which will talk to a unix domain socket for a "local instance"
without ruining your hash ring. There's no way to make use of it unless
you're using different apps for different things.
Reply all
Reply to author
Forward
0 new messages