You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we are just destroying the socket (terminating the connection) whenever a route isn't matched against our WebSocket routes in the route map. This results in 5xx errors at the ALB since the ALB gets stuck waiting for a response and eventually times out, leaving the client hanging until timeout and eventual 5xx.
The fix is to send back HTTP/1.1 404 Not Found\r\n\r\n and give a proper HTTP response upon being unable to upgrade. See MDN for more about Upgrade protocol:
If the server decides to upgrade the connection, it sends back a 101 Switching Protocols response status with an Upgrade header that specifies the protocol(s) being switched to. If it does not (or cannot) upgrade the connection, it ignores the Upgrade header and sends back a regular response (for example, a 200 OK).
Currently we are just destroying the socket (terminating the connection) whenever a route isn't matched against our
WebSocket
routes in the route map. This results in5xx
errors at the ALB since the ALB gets stuck waiting for a response and eventually times out, leaving the client hanging until timeout and eventual5xx
.The fix is to send back
HTTP/1.1 404 Not Found\r\n\r\n
and give a proper HTTP response upon being unable to upgrade. See MDN for more aboutUpgrade
protocol:-- MDN: Protocol upgrade mechanism
The text was updated successfully, but these errors were encountered: