You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/12 06:06:39 UTC

[GitHub] [pulsar] michaeljmarshall commented on a diff in pull request #16045: [fix][proxy] Use correct channel for HAProxyMessage dest address

michaeljmarshall commented on code in PR #16045:
URL: https://github.com/apache/pulsar/pull/16045#discussion_r993031119


##########
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java:
##########
@@ -233,7 +233,7 @@ private void writeHAProxyMessage() {
                 InetSocketAddress clientAddress = (InetSocketAddress) inboundChannel.remoteAddress();
                 String sourceAddress = clientAddress.getAddress().getHostAddress();
                 int sourcePort = clientAddress.getPort();
-                InetSocketAddress proxyAddress = (InetSocketAddress) inboundChannel.remoteAddress();
+                InetSocketAddress proxyAddress = (InetSocketAddress) outboundChannel.localAddress();

Review Comment:
   Thanks for your response @codelipenghui. I finally got back to this and did some research with @lhotari. Based on these docs, https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html, it looks like we want the proxy address. I'm updating the PR now. I think it could be useful to expose the address in the broker logs to make it clear which proxy is doing the routing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org