-
Notifications
You must be signed in to change notification settings - Fork 579
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
4.x: WebServer: provide mechanism to limit number of concurrent requests #6819
Comments
Regarding https://openjdk.org/jeps/444, you can use Semaphores in order to limit the concurrent requests. |
There are a lot of options here: Regarding number of requests:
Regarding timeout of idle:
|
Proposal (working on code to check if feasible):
Not sure about this one, as it introduces a requirement to run a worker thread that checks this
|
Your proposal looks good. I assume "listener" is a server socket listener? So these limits would apply per port. In which case maybe they should be configurable per port. I do not think it needs to be per protocol. I was not thinking of limits for numbers of sequential requests. In Apache the idle timeout unit is seconds and the default looks to be 5 minutes. So by default if a connection is idle for 5 minutes it is closed. |
By the way, how about this: https://github.com/bucket4j/bucket4j |
To protect against unbounded resource consumption we should consider adding mechanisms to:
The text was updated successfully, but these errors were encountered: