dev@glassfish.java.net

Re: How does the loadbalance plugin get HTTP requester's IP?

From: Kshitiz Saxena <Kshitiz.Saxena_at_Sun.COM>
Date: Thu, 13 May 2010 14:41:56 +0530

Hi Shen,

Requestor's IP address is provided by web-server. Load-balancer uses
web-server API to access that information. In general it is requestor's
IP address and port from which connection was made to web-server. In
case a proxy is used, it will proxy's IP address and port.

Source code of load-balancer plugin is not open-source. Users only have
access to load-balancer plugin binary.

Thanks,
Kshitiz

On Thursday 13 May 2010 02:26 PM, Shen Hongzhou wrote:
> Hi all,
> We have the requirement of getting the HTTP requester's IP address,
> and we have found that the loadbalance plugin sets the IP in
> HTTPHeader(proxy-ip).
> We want to know How does the loadbalance plugin get HTTP requester's
> IP address? Does it consider the proxy which used by the requester?
> If you give me some source code, that will be great!
> Thanks!
>
> Shen