Forum Discussion

Ian_Stewart_390's avatar
Ian_Stewart_390
Icon for Nimbostratus rankNimbostratus
Oct 14, 2005

iRules, URL Routing and Cookie Persistance

Hi Everyone,

 

 

We have a BigIP 1500, configured with several virtual servers and pools. We use an iRule to make routing decisions to direct traffic to the correct pool based on request URL, since the site is distributed across several pools.

 

 

The iRule for one of the virtual servers is as follows. It has a default pool of webnode3_pool.

 

 

when CLIENT_ACCEPTED {

 

set defpool [LB::server pool]

 

}

 

 

when HTTP_REQUEST {

 

set request_uri [string tolower [HTTP::uri]]

 

set request_host [string tolower [HTTP::host]]

 

 

if { $request_uri contains "/aspnet_client/" } {

 

pool webnode_pool

 

}

 

elseif { $request_uri contains "/ig_common/" } {

 

pool webnode_pool

 

}

 

elseif { $request_uri contains "/cpm/" } {

 

pool cpmweb_pool

 

}

 

elseif { $request_uri contains "/agentrequest/" } {

 

pool webnode_pool

 

}

 

elseif { $request_uri contains "/agents/" } {

 

pool webnode_pool

 

}

 

elseif { $request_uri contains "/home/" } {

 

pool webnode_pool

 

}

 

else {

 

pool $defpool

 

}

 

}

 

 

The URL routing works fine. The virtual server is configured to use cookie-insert persistance. If I look at my cookies when I browse the site, I can see BigIP cookies. My concern is that in the administration webpage, under persistance records, every record is showing SOURCE ADDRESS AFFINITY. We recently tried to run a load balancing test, (one machine that makes multiple connections to the site to generate a load), and the BigIP failed to load balance any of the requests.

 

 

Does using the iRule not allow the default persistance method defined on the virtual server to take effect? Is there something else I'm missing here -- why isn't cookie-insert persistance working?

 

 

Thanks in advance,

 

Ian

22 Replies