Envoy: Websockets and retries

Created on 7 Feb 2020  路  6Comments  路  Source: envoyproxy/envoy

Is it possible to configure Envoy to retry a Websocket connection on another backend server when either:

  • the Websocket upgrade fails (for example a 503 is returned instead of a 101)
  • the server does not accept the connection

thank you!

question stale

All 6 comments

I don't think we support Websocket retries currently, but @alyssawilk would know for sure. She is doing a bunch of work in this area and might be able to get this tracked as a feature addition as needed.

I think websockets are treated just as other HTTP requests. So there's no way to make only websockets retry, but if configured buffer enough of the upgrade request that if you 5xx you could send the upgrade header elsewhere.

hi @alyssawilk thank you for your response. When you say

there's no way to make only websockets retry

Should I understand that it is because the websocket upgrade is just another GET request, so it will be treated just the same?

So, if I configure retries for GET, lets say for 503 error codes, will that make Envoy to retry the GET (upgrage request) on a different backend when the first one returns 503 (instead of a 101)?

I believe that will work - if it doesn't I'm happy to dig a bit :-)

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeremybaumont picture jeremybaumont  路  3Comments

weixiao-huang picture weixiao-huang  路  3Comments

hawran picture hawran  路  3Comments

hzxuzhonghu picture hzxuzhonghu  路  3Comments

rshriram picture rshriram  路  3Comments