Okay, I\'ve spent over a week trying to figure this out to no avail, so if anyone has a clue, you are a hero. This isn\'t going to be an easy question to answer, unless I am
I've been looking into something very similar to this myself, with the intent of generating (and destroying) Node.js cluster nodes on the fly.
Disclaimer: I'd still not recommend doing this with Node; nginx is more stable for the sort of design architecture that you're looking for, or even more so, HAProxy (very mature, and easily supports sticky-session proxying). As @tsturzl indicates, there is satellite
, but given the low volume of downloads, I'd tread carefully (at least in a production environment).
That said, since you appear to have everything already set up with Node, rebuilding and re-architecting may be more work than it's worth. Therefore, to install the caronte branch with NPM:
Remove your previous http-node-proxy
Master installation with npm uninstall node-proxy
and/or sudo npm -d uninstall node-proxy
Download the caronte branch .zip and extract it.
npm -g install /path/to/node-http-proxy-caronte
sudo npm link http-proxy
I've got it up and running using their basic proxy example -- whether or not this resolves your dropped sessions issue or not, only you will know.