-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add http connection limits config #17909
Add http connection limits config #17909
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I made a comment about the response (should it be closed / ended with 429?)
if (current == maxConnections) { | ||
//just close the connection | ||
LOGGER.debug("Rejecting connection as there are too many active connections"); | ||
event.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just close or return a 429 response?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically there may not actually even be a request yet (as you can open the connection before sending the request), so its hard to say. The problem with connection limits is that there is not really any graceful way to handle them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The question is how would the load-balancer in front react to "close". This may even be implementation specific.
@vietj, when you worked on the HTTP proxy for Vert.x, did you look into that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other thing is that connection limits are probably generally less important that concurrent request limits. If the connections are idle they have very low overhead.
@vietj is this something that can be done in Vert.x? |
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 67633e4
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 16 #📦 extensions/vertx-http/deployment✖ |
67633e4
to
bad5ff6
Compare
@stuartwdouglas should merge it as it is? We can improve later. |
I think it is fine as is, I don't really like the approach but it should work. |
No description provided.