-
Notifications
You must be signed in to change notification settings - Fork 11.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
[ISSUE #6957] Support Proxy Protocol for gRPC and Remoting server #6958
Conversation
…ity of ProtocolNegotiator
…ity of ProtocolNegotiator
… scalability of ProtocolNegotiator
… scalability of ProtocolNegotiator
… scalability of ProtocolNegotiator
… scalability of ProtocolNegotiator
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.
@dingshuangxi888 CI execution failed, please fix
remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/interceptor/HeaderInterceptor.java
Show resolved
Hide resolved
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/interceptor/HeaderInterceptor.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/interceptor/HeaderInterceptor.java
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6958 +/- ##
=============================================
- Coverage 42.68% 42.66% -0.03%
- Complexity 9236 9239 +3
=============================================
Files 1133 1136 +3
Lines 80492 80635 +143
Branches 10515 10538 +23
=============================================
+ Hits 34362 34404 +42
- Misses 41834 41927 +93
- Partials 4296 4304 +8 ☔ View full report in Codecov by Sentry. |
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
Which Issue(s) This PR Fixes
Fixes #6957
Brief Description
When the RocketMQ client accesses the RocketMQ server through multiple layers of NAT or TCP proxies, the server is unable to obtain the actual IP address information of the client. In such cases, the HAProxy's Proxy protocol can be introduced to transparently pass the initial TCP connection information of the client. This allows the server to accurately identify the source of message production and consumption.
How Did You Test This Change?
I have applied for a proxy service that supports the transparent transmission of the Proxy Protocol. The client sends requests to the server through this proxy service. The server successfully retrieves the Proxy Protocol data and extracts the client's real IP address from it. The server then sets this IP address in the message's attributes.