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
[feat][proxy] Support proxy limit maximum connections per IP #17167
Merged
Technoboy-
merged 19 commits into
apache:master
from
mattisonchao:support_proxy_max_connection_per_ip
Aug 29, 2022
Merged
[feat][proxy] Support proxy limit maximum connections per IP #17167
Technoboy-
merged 19 commits into
apache:master
from
mattisonchao:support_proxy_max_connection_per_ip
Aug 29, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eolivelli
approved these changes
Aug 24, 2022
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.
LGTM
Technoboy-
added
type/feature
The PR added a new feature or issue requested a new feature
area/proxy
labels
Aug 24, 2022
Jason918
approved these changes
Aug 25, 2022
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.
LGTM
nicoloboschi
requested changes
Aug 25, 2022
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/limiter/ConnectionController.java
Outdated
Show resolved
Hide resolved
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
Outdated
Show resolved
Hide resolved
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java
Outdated
Show resolved
Hide resolved
…yConfiguration.java Co-authored-by: Nicolò Boschi <boschi1997@gmail.com>
nicoloboschi
approved these changes
Aug 26, 2022
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.
LGTM
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java
Show resolved
Hide resolved
codelipenghui
approved these changes
Aug 29, 2022
shoothzj
approved these changes
Aug 29, 2022
Technoboy-
approved these changes
Aug 29, 2022
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Pulsar has the
brokerMaxConnectionsPerIp
configuration at thebroker, we can use it to limit the maximum connections per IP.
The original motivation and PR here: #10754
IMO, we can also apply it to pulsar-proxy, because when a large
number of proxy accesses under the same IP (maybe due to some wrong
operations) will cause the proxy to accept too much wrong traffic and
cause service unstable.
Discussion link: https://lists.apache.org/thread/co00zx8ns3ksbccxs82lfh624rx1sht6
Modifications
ConnectionController
for proxy part.ConnectionController
tobroker-common
module.maxConcurrentInboundConnectionsPerIp
ServerError.NotAllowedError
command to prevent client reconnecting.Verifying this change
Documentation
Check the box below or label this PR directly.
Need to update docs?
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)