I know that there is an ALB and NLB option that works with websockets. I can't understand why classic ELB with HTTP protocol doesn't work with websocket connections, although at the instance there is Nginx which is configured to add connection and upgrade headers. Once I switch it to TCP protocol it works. Can you explain how exactly this protocol works when there is HTTP proxy in the middle?
It is still using same TCP, as soon as client reached the server and Nginx added upgrade headers, server response with switch protocol message should reach the client and then they just use TCP of established HTTP connection. What is the reason it drops this connection on an ELB, response buffering, or it just drops all non HTTP traffic?
So Nginx sends to ELB
HTTP/1.1 101 Switching Protocols
Server: nginx/1.13.1
Date: Sat, 21 Mar 2020 07:53:38 GMT
Connection: upgrade
Upgrade: websocket
Sec-WebSocket-Accept: PozdkhgL/Zdkgh3kwu0KkACFCt0=
But ELB never deliver it back to client, and request get timed out.