Is it possible to have a unix socket across a network? Is it possible to have multiple application servers running unicorn use that same shared socket?
The setup I'd like to achieve would look like:
nginx
↓
Unicorn Unicorn
nginx config:
upstream github {
server unix:/shared/unicorn.sock;
}
Unicorn config (x2)
listen '/shared/unicorn.sock'
I know it's possible to do something like:
upstream unicorns {
server 192.168.1.100:5000;
server 192.168.1.101:5000;
}
However I think this is not ideal, because you don't get the benefit of Unicorn doing its own load balancing and you have to specify the ip addresses ahead of time.
A few years ago GitHub blogged about their Unicorn setup, where I think they are describing a similar setup, but it's not clear how to achieve this.