- Newest
- Most votes
- Most comments
Hi Bhanu,
First of all, what you're trying to do is perfectly feasible with the configuration you've mentioned, so don't give up - it's probably a configuration problem somewhere.
Now here are a few things to test/check:
- WebSocket Support on ALB
Application Load Balancers do support WebSocket traffic, but you need to ensure that the 'Connection' header is set to 'Upgrade' and the 'Upgrade' header is set to 'websocket' during the WebSocket handshake. You can see some header example here
- WebSocket Path in the Application
As 404 is a NOT FOUND HTTP error, ensure that the WebSocket endpoint path is correctly specified in the ALB listener rules and that it matches the path configured in your Golang application using the Gorilla framework
- Look at the logs
One thing to try is to connect directly to the WebSocket service of one of your fargate task to bypass the ALB and to rule out any issues with the ALB configuration. If you cannot make it work, check the logs.
If websocket are working from ECS standpoint, then you can enable [ALB access Logs] (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html) to get more insight into the requests that are reaching the ALB and how they are being handled.
Good luck !
Relevant content
- asked 9 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago