-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[wip] Shutdown Websocket Connections Gracefully in the queue-proxy #16362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
dprotaso
commented
Jan 27, 2026
- have the websocket server test image send a close message when shutting down gracefully
- include an e2e test that asserts websockets connections are gracefully handled
- include a special handler to track hijacked connections and create a drain method
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16362 +/- ##
==========================================
- Coverage 80.17% 80.13% -0.04%
==========================================
Files 216 217 +1
Lines 13440 13461 +21
==========================================
+ Hits 10775 10787 +12
- Misses 2300 2309 +9
Partials 365 365 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
One observation I have is that the activator will drop hijacked connections similar to the queue proxy. Hijacking happens implicitly with the The solution in the queue-proxy is straight forward because we know K8s will send a TERM signal to the user container - thus we can expect apps to return a close frame when that happens. Those are the changes I made to our websocket server. This isn't necessary but just maybe it's a good practice With the activator though - there's no way to signal downstream to end the connection. We maybe could send a close frame on the connection but it makes the activator protocol aware and I don't think we can write a message on an upstream connection like this (it could be interleaved with another). Given this - I don't think the activator issue should prevent this change from merging - but just the solution there isn't straighforward. |
|
/retest hmm
|