Forum Discussion

quovadis_74274's avatar
quovadis_74274
Icon for Nimbostratus rankNimbostratus
May 06, 2008

NPATH and Proxies

Hi there

 

 

I'm currently dealing with an ISP which is providing a shared load balance solution for two webservers.

 

 

They are using NPATH however with some ISPs that I've tested with (They're running multiple NetCache devices) the proxy address is being used for the destination member of the pool. The outbound proxy IP changes as theyre running some sort of cluster for the NetCache devices. Basically my session state is lost between servers as the BigIP is sending each request to a different server.

 

 

Basically the following happens:

 

 

First request to the Virtual IP:

 

Source IP (which is a proxy IP) : 196.25.255.214

 

X-Forwarded-For: 41.246.207.72, 198.54.202.118

 

 

The next request to the Virtual IP (in some times a simple refresh or form submit):

 

Source IP (which is a proxy IP) : 198.54.202.250

 

X-Forwarded-For: 41.246.207.72, 198.54.202.118

 

 

The next request to the Virtual IP:

 

Source IP: 198.54.202.226

 

X-Forwarded-For: 41.246.207.72, 198.54.202.118

 

 

During the entire process the HTTP headers including ASP session ID are constant and don't change. But obviously the load balancer sees the request from the different source IPs as different users and as such redirects the request to the next member in the pool.

 

 

Is there any way to prevent this happening?

 

 

I've tried sending through an iRule based on code in your samples page that looks for a cookie set by the webservers (each member has a unique ID) but they're having issues with implementing it (i've included it below)

 

 

Any suggestions would be greatly appreciated.

 

 

Thanks

 

ME

 

 

 

when RULE_INIT {

 

set cookie_name "xdsvr"

 

set node_forced ""

 

}

 

 

when HTTP_REQUEST {

 

set has_cookie [HTTP::cookie exists $::cookie_name]

 

 

if { $has_cookie } {

 

set node_forced [HTTP::cookie value $::cookie_name]

 

}

 

 

if { $node_forced ne "" } {

 

if { $node_forced eq "xd1" } {

 

set node_ip "[[[IP ADDRESS REMOVED]]]"

 

set node_port "80"

 

pool OURPOOLNAME member $node_ip $node_port

 

}

 

if { $node_forced eq "xd2" } {

 

set node_ip "[[[IP ADDRESS REMOVED]]]"

 

set node_port "80"

 

pool OURPOOLNAME member $node_ip $node_port

 

}

 

}

 

}

 

 

 

  • I had a similiar issues, so I simply used Profile Cookie persistance insert