Skip to content

Allow upgrade to websocket for HTTP 1.1 listeners#867

Merged
Xunzhuo merged 1 commit intoenvoyproxy:mainfrom
arkodg:websocket-upgrade
Jan 11, 2023
Merged

Allow upgrade to websocket for HTTP 1.1 listeners#867
Xunzhuo merged 1 commit intoenvoyproxy:mainfrom
arkodg:websocket-upgrade

Conversation

@arkodg
Copy link
Copy Markdown
Contributor

@arkodg arkodg commented Jan 6, 2023

Fixes: #836

Signed-off-by: Arko Dasgupta arko@tetrate.io

@arkodg arkodg requested a review from a team as a code owner January 6, 2023 01:52
@arkodg
Copy link
Copy Markdown
Contributor Author

arkodg commented Jan 6, 2023

@skriss @AliceProxy does Contour and Emissary have this upgrade enabled by default as well, similar to Istio ?

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 6, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.17%. Comparing base (8dd60b1) to head (777aebf).
⚠️ Report is 3645 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #867      +/-   ##
==========================================
+ Coverage   64.10%   64.17%   +0.07%     
==========================================
  Files          52       52              
  Lines        7170     7179       +9     
==========================================
+ Hits         4596     4607      +11     
+ Misses       2290     2288       -2     
  Partials      284      284              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@Xunzhuo Xunzhuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should we use configuration to determine if we use websocket or not?

@arkodg
Copy link
Copy Markdown
Contributor Author

arkodg commented Jan 6, 2023

Or should we use configuration to determine if we use websocket or not?

@Xunzhuo can you share any reason why a user might have web sockets enabled in the app backend but would like to force disable it in the proxy ?
imho this commit enables web socket upgrade proxying based on client-server web socket capability, and enabling it by default is helping the HTTPRoute owner (app developer) set one less thing to get their apps connected to the outside world.

@arkodg arkodg requested a review from Xunzhuo January 7, 2023 00:24
Xunzhuo
Xunzhuo previously approved these changes Jan 7, 2023
Copy link
Copy Markdown
Member

@Xunzhuo Xunzhuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry maybe I overthink it, LGTM, thanks!

Fixes: envoyproxy#836

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@Alice-Lilith
Copy link
Copy Markdown
Member

Emissary will not upgrade to websockets unless explicitly configured by the user

@skriss
Copy link
Copy Markdown
Contributor

skriss commented Jan 10, 2023

Contour's is also opt-in on a per-route basis (for HTTPProxy). It's not currently supported for Gateway API.

@danehans danehans added the release-note Indicates a required release note label Jan 10, 2023
@danehans danehans added this to the 0.3.0-rc.1 milestone Jan 10, 2023
@arkodg
Copy link
Copy Markdown
Contributor Author

arkodg commented Jan 10, 2023

thanks @AliceProxy and @skriss for sharing Emissary's and Contour's implementation.
I proposed enabling it by default for now (and changing this behavior in the future in case the upstream Gateway API is explicit about this feature being opt-in) in the community meeting today and did not receive any objection

@Xunzhuo Xunzhuo merged commit 2576296 into envoyproxy:main Jan 11, 2023
@arkodg arkodg deleted the websocket-upgrade branch January 11, 2023 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Indicates a required release note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support websocket

6 participants