I have a node.js application server running on port 80 and I recently added realtime messaging through Primus websockets transformer on port 9001.
It works well in single instance. I deployed the messaging to Beanstalk environment with the following configuration.
AWS Elastic Beanstalk
Platform version v2.0.0
Nodejs version v0.12.6
Primus version v4.0.5
- Port 9001 is added to the security group of the instance as shown in the screenshot.
- Proxy server is set to "none" in configuration options.
- TCP Listener is added in the Elastic Load Balancer configuration.
- Proxy-Protocol is enabled as mentioned in the aws documentation.
- Added proxywrap to the primus server configuration.
But the client requests doesn't reach the instance and connection timed out. Has anyone used primus with websockets behind AWS ELB? Please let me know the configuration which enables websockets communication behind Elastic Beanstalk.