2👍
AWS has launched new Application Load Balancer that supports web sockets. Change your ELB to Application Load Balancer and that will fix your issue.
https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/
2👍
As described here it’s possible to run Django Channels on Elastic Beanstalk using an Application Load Balancer.
In a simplified form, it’s basically:
- Create an ALB
- Add 2 target groups, one that points to port 80, and one that points to Daphne port, ie 8080.
- Create 2 path rules. Let the default route point to target group 1 (port 80), and set the second to use a relative path, ie. /ws/ and point it to target group 2.
- Add Daphne and workers to supervisord (or another init system)
- DONE! Access Daphne/websockets through the relative url ws://example.com/ws/.
- Gunicorn.socket: Failed with result 'service-start-limit-hit'
- Check if a template exists within a Django template
0👍
I suppose ALB is the only way. The reason is because with the SSL protocol listner in the classic LB, the session stickiness and X-Forwaded headers won’t be forwarded and will result in the proxy server redirect loop. Doc is here,
http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html
I’ll update the answer if I find out a way with the existing CLB.