iRule to assign node based on URI, bypassing source IP persistence
Hello,
We are using a standard VS to load balance HTTPS traffic to 2 web servers, using source IP persistence. For a particular statistics application we need to bypass load balancing and persistence and send the HTTPS traffic to the 2nd web server.
I customized this iRule to catch the URI /stats/stats.js and send to a pool containing only the 2nd server :
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/stats/" } {
pool stats.https.pool
}
else {
pool website.https.pool
}
}
The default condition seems to work fine as all URI's are working. But on the /stats/stats.js URI I get permanently 404's.
According to a logging iRule I'm using I see that regular traffic is sent to either one or the other web servers, and the /stats/ traffic to the 2nd one only... But I still get 404's. Also CURL from the BIG-IP shows that the URL is accessible on the destination server.
I tried to add 'persist none' before the pool assignment but that didn't help.
Any advise would be strongly appreciated ! I'm sure this is a basic problem but I don't get it right now 🙂
Cheers,
Gerald