Closed gordyr closed 10 years ago
Your ELB should use TCP for port 8084 as well. In HTTPS mode, the ELB actually decrypts traffic and fiddles with the application-later protocol (HTTP in this case), which we don't want.
Thanks.. I've just tried as you suggested and used require('net') instead of require('https') (which I assume is correct) but the problem still remains.
You should still use the https
module in node, but the ELB needs to be set to TCP mode instead of HTTPS.
Hi,
I'm having some real troubles getting this set up.
I need to run a cluster of node.js instances, all running primus (https://github.com/primus/primus) with the sock.js transport from behind an ELB.
My ELP listeners are configures like so:
TCP 80 -> TCP 80 HTTPS 8084 -> HTTPS 8084
8084 is the port that the node.js/Primus servers use. When a client connects a simple GET request is sent to the node js server, I intercept it and enable CORS since it is on a different domain to my app then finally Primus/Sock.js should upgrade the connection to a websocket through port 80.
I have correctly enabled the proxy protocol for both ports 8084 and 80 and of course have installed proxywrap.
Now everything works perfectly when I set the primus connection address to a single server and disable proxywrap. But as soon as I turn proxywrap back on and try to send connect to the loadbalancer, it fails.
I'm relatively inexperienced with this kind of stuff and feel at a complete loss.
Any help or advice you could give me would be greatly appreciated.
Here is my node.js/Primus code: