Nginx – Using UNIX sockets with nginx

nginxrubysocketthinunix

I would like to clarify some doubts I have about using nginx to proxy requests over a cluster of thin servers (http://code.macournoyer.com/thin/).
I've read many blog posts about using UNIX sockets and not TCP connections, my only doubt is about multiserver configurations, where the cluster is spread on more than one machine, and the proxy acts as a frontend.
How do I share UNIX sockets ? Should I share the directory that contains the .sock files or there's something I'm missing ?
How do you guys handle this kind of deployment ?

p.s. hhttp://macournoyer.wordpress.com/2008/01/26/get-intimate-with-your-load-balancer-tonight/

Best Answer

UNIX domain sockets are for local connections only. Exporting the file-system that they are on to another machine won't make that socket accessible over the network. See the Wikipedia article on Unix domain sockets for a little more information.