Answer the question
In order to leave comments, you need to log in
How to run memcached on TCP and UDS at the same time?
Hello, there is a service that needs memcached, but here's the problem - it can only connect to it via TCP. Of course, in my applications I use memcached only via UDS. Googling, I did not find a sensible instruction. How is it possible to raise memcached simultaneously on TCP and UDS?
Answer the question
In order to leave comments, you need to log in
If you use nginx - proxy through it the port to the socket
stream {
upstream memcached {
server unix:/tmp/memcached.sock; #поменяйте путь до сокета
}
server {
listen 127.0.0.1:11211; # если хотите забиндить только на локалхост
#listen 11211; # если хотите забиндить на все интерфейсы, а не только локалхост
proxy_pass memcached;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question