Repository navigation
[feat][proxy] Support proxy limit maximum connections per IP - #17167
Merged
Technoboy- merged 19 commits intoAug 29, 2022
Merged
Conversation
nicoloboschi
requested changes
Aug 25, 2022
…yConfiguration.java Co-authored-by: Nicolò Boschi <[email protected]>
codelipenghui
approved these changes
Aug 29, 2022
hezhangjian
approved these changes
Aug 29, 2022
Technoboy-
approved these changes
Aug 29, 2022
1 of 2 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
brokerMaxConnectionsPerIpconfiguration 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
ConnectionControllerfor proxy part.ConnectionControllertobroker-commonmodule.maxConcurrentInboundConnectionsPerIpServerError.NotAllowedErrorcommand 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)