Has anyone used Primus with websockets behind the awas Elastic Load Balancer?

I have a node.js application server running on port 80, and I recently added real-time messaging through Primus websockets transformer on port 9001.

This works well in one instance. I deployed messaging to Beanstalk 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 instance security group, as shown in the screenshot. enter image description here
  • In the configuration settings for the proxy server is set to "none". enter image description here
  • A TCP listener is added to the elastic load balancing configuration. enter image description here
  • The proxy protocol is enabled as indicated in the aws documentation . enter image description here enter image description here enter image description here
  • Added proxywrap function for primus server configuration.

. - primus websockets AWS ELB? , , - Beanstalk.

0
2

websockets (https://github.com/websockets/ws), 80 8080 ELB . -.

:

https://cloud.githubusercontent.com/assets/3421858/14969922/ff6659f4-10bc -11e6-903c-168a530efebd.png

:

https://cloud.githubusercontent.com/assets/3421858/14969937/160c7544-10bd -11e6-8357-a11f5481d9fd.png

:

https://cloud.githubusercontent.com/assets/3421858/14969950/38776f1c-10bd -11e6-961b-aabbf0ab1d66.png

:

https://cloud.githubusercontent.com/assets/3421858/14969983/6c4f47ce-10bd -11e6-8fa0-eb8180ffb281.png

0

ELB

EC2 " " "" . "Idle timeout", - "600" ( 10 ).

WS ping 5 ( , ELB). primus API, .

0

Source: https://habr.com/ru/post/1531927/


All Articles