Skip to content
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

Customize a server WebSocket's idle timeout #1985

Open
mrb-twx opened this issue May 11, 2017 · 7 comments
Open

Customize a server WebSocket's idle timeout #1985

mrb-twx opened this issue May 11, 2017 · 7 comments
Assignees
Milestone

Comments

@mrb-twx
Copy link

mrb-twx commented May 11, 2017

It would be useful if Vert.x permitted the idle timeout to be set on a per WebSocket basis.

Currently, the idle timeout for a server WebSocket can only be set via io.vertx.core.http.HttpServerOptions#setIdleTimeout, but because this is an HTTP server option it applies to all server WebSockets. This prevents someone from specifying different WebSocket idle timeouts based on things like the URI, path, or headers.

@vietj
Copy link
Member

vietj commented May 18, 2017

would you mind to contribute such feature ?

@mrb-twx
Copy link
Author

mrb-twx commented May 22, 2017

Sure, I'll take a look at it.

@sliechti
Copy link

sliechti commented Jan 4, 2023

@vietj if you share some pointers I may be able to contribute the patch.
Not being able to set idle timeout at the websocket level is problematic.
If we set the HTTP timeout too high, let's sat 30s/60s we can potentially have lingering HTTP connections and that may turn into a scalability issue.
If we set the timeout too low, we are forced to send pings or heartbeats over websocket which would translate in unnecessary traffic.

@vietj
Copy link
Member

vietj commented Jan 5, 2023

how does the code decide when the timeout should be changed ?

@sliechti
Copy link

sliechti commented Jan 5, 2023

@vietj I don't know if Netty has a way to differentiate a regular HTTP connection from a Websocket one but one way I can think of this could be done is based on HTTP headers, if the request has the upgrade request the "setWebSocketIdleTimeout" applies.

@vietj
Copy link
Member

vietj commented Jan 6, 2023

I see now indeed it could be done after the upgrade

@vietj vietj added this to the 4.4.0 milestone Jan 6, 2023
@sliechti
Copy link

sliechti commented Jan 8, 2023

@vietj thank you for adding to the roadmap!

@vietj vietj self-assigned this Feb 14, 2023
@vietj vietj modified the milestones: 4.4.0, 4.4.1 Mar 2, 2023
@vietj vietj modified the milestones: 4.4.1, 4.4.2 Mar 31, 2023
@vietj vietj modified the milestones: 4.4.2, 4.4.3 May 12, 2023
@vietj vietj modified the milestones: 4.4.3, 4.4.4-SNAPSHOT, 4.4.4 Jun 7, 2023
@vietj vietj modified the milestones: 4.4.4, 4.4.5 Jun 22, 2023
@vietj vietj modified the milestones: 4.4.5, 4.4.6 Aug 30, 2023
@vietj vietj modified the milestones: 4.4.6, 4.5.0 Sep 12, 2023
@vietj vietj modified the milestones: 4.5.0, 4.5.1 Nov 15, 2023
@vietj vietj modified the milestones: 4.5.1, 4.5.2 Dec 13, 2023
@vietj vietj removed this from the 4.5.2 milestone Jan 30, 2024
@vietj vietj added this to the 4.5.3 milestone Jan 30, 2024
@vietj vietj modified the milestones: 4.5.3, 4.5.4 Feb 6, 2024
@vietj vietj modified the milestones: 4.5.4, 4.5.5 Feb 22, 2024
@vietj vietj modified the milestones: 4.5.5, 4.5.6 Mar 14, 2024
@vietj vietj modified the milestones: 4.5.6, 4.5.7, 4.5.8 Mar 21, 2024
@vietj vietj modified the milestones: 4.5.8, 4.5.9 May 24, 2024
@vietj vietj modified the milestones: 4.5.9, 4.5.10 Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants