I'm using an Ant Media cluster with multiple servers to handle WebSocket connections, and I'm running into an issue with the protocol support. Specifically, I'm using an Elastic Load Balancer to distribute WebSocket connections to the servers and have configured it to use an Application-controlled sticky session cookie to ensure that all WebSocket connections from a single client are routed to the same server.
However, I'm noticing that sometimes the WebSocket connection is established with a different server than the one used for the previous connection, causing issues with my application. After investigating the issue, I discovered that the server is not responding with the correct WebSocket protocol in the Sec-WebSocket-Protocol header during the WebSocket handshake.
I was wondering if anyone else has run into this issue with the Ant Media WebSocket implementation, and if so, if there's a solution or workaround that I can use to ensure that the connection is always established with the correct server. Is there a specific WebSocket protocol that I should be using to ensure proper load balancing with the sticky session cookie?
Any help or advice would be greatly appreciated. Thank you!
Question
Jeet Singh
Hello everyone,
I'm using an Ant Media cluster with multiple servers to handle WebSocket connections, and I'm running into an issue with the protocol support. Specifically, I'm using an Elastic Load Balancer to distribute WebSocket connections to the servers and have configured it to use an Application-controlled sticky session cookie to ensure that all WebSocket connections from a single client are routed to the same server.
However, I'm noticing that sometimes the WebSocket connection is established with a different server than the one used for the previous connection, causing issues with my application. After investigating the issue, I discovered that the server is not responding with the correct WebSocket protocol in the Sec-WebSocket-Protocol header during the WebSocket handshake.
I was wondering if anyone else has run into this issue with the Ant Media WebSocket implementation, and if so, if there's a solution or workaround that I can use to ensure that the connection is always established with the correct server. Is there a specific WebSocket protocol that I should be using to ensure proper load balancing with the sticky session cookie?
Any help or advice would be greatly appreciated. Thank you!
Link to comment
Share on other sites
Top Posters For This Question
1
Popular Days
Apr 7
1
Top Posters For This Question
Jeet Singh 1 post
Popular Days
Apr 7 2023
1 post
0 answers to this question
Recommended Posts