I'm new user of envoy proxy, maybe someone can help me
I have 2 upstream hosts (UH1 and UH2), and configured envoy proxy to proxy (round robin) websocket connections from a client (frontend) to them.
Let's say UH1 has an active websocket connection (WC1) and UH1 becomes down (closes all its connections) I would like to keep the connection WC1 alive with a client and move the connection to UH2. Could anyone say if it is possible?
Thank you in advance!
I asked this question in the official google group of envoy-dev team and got an answer from Stephan:
This isn’t currently supported.
My sense is that one might be able to write an HTTP filter that takes the place of the router filter to support this behavior in conjunction with upgrade configs[1], but it’s probably a lot of work. That filter would probably need to buffer the original HTTP request to be able form a new websocket to a different upstream, and it would need to decode websocket frames to avoid forwarding partial frames. Further if the messages on the websocket are request/response oriented the filter would have buffer websocket frames and have knowledge of their content to avoid dropping requests.
In my experience, optimizing reconnect from the client and just forming a new websocket connection is simpler to implement and also provides benefits when the connection between the client and Envoy is severed.
Stephan