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

Jetty Connection #11521

Closed
SarathChandraRS opened this issue Mar 14, 2024 · 4 comments
Closed

Jetty Connection #11521

SarathChandraRS opened this issue Mar 14, 2024 · 4 comments

Comments

@SarathChandraRS
Copy link

Jetty Version

Jetty Environment

Java Version

Question
Hi Team,
The question is related to Jetty Connection Limit.
In general, we use Connection limit as configuration and we set this value before Jetty start.
But as we have setMaxConnections() method on ConnectionLimit class we can change the connections dynamically.
Now the question is would it be ok to change the connection limit dynamically without restart. Since the method is supported mostly it would be. But I would like to know if there are any drawbacks with this mechanism ?
Thanks.

@joakime
Copy link
Contributor

joakime commented Mar 14, 2024

What version of Jetty?
How are you configuring Jetty's Connection Limit?
What connectors are you using?
What are your connector configurations?
We need more information.

@joakime
Copy link
Contributor

joakime commented Mar 14, 2024

For Jetty 12, using a org.eclipse.jetty.server.ConnectionLimit bean that was created before the Connector were started, you can use the ConnectionLimit.setMaxConnections(int).
But ...

  • that will only work on Connectors that have "accepting" event.
  • if the "limiting" feature has kicked in (you are at max) the change will not undo the limiting in place.
  • after setting the setMaxConnection(int) only a newly accepted connection will cause the state change in the ConnectionLimit.
  • if you use multiple Connectors, the limit is across all connectors, not per connector.

@SarathChandraRS
Copy link
Author

SarathChandraRS commented Mar 14, 2024

Thanks @joakime
We are currently using Jetty 10.
As of now we are configuring it as part of constructor. Which means we set this value before we start the server.
We have multiple connectors. Around 2. We are using using ServerConnector.

@joakime
Copy link
Contributor

joakime commented Mar 14, 2024

Jetty 11 and older are now at End of Community Support.

I can only comment about behaviors in Jetty 12 (the only supported version of Jetty at the moment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants