Load balancing not bypassed by 'node' nor 'pool' commands in iRule
Hi all,
I'm trying to force a packet forward to a specific pool member when the pool receives a HTTP_REQUEST with a specific URI, but it seems the iRule commands to bypass balancing (namely, node and pool) are being ignored.
Specifically, every command in the rule seems to be executed but them. Let's say I have hosts 192.168.1.10 and 192.168.1.15 in the pool, and 192.168.1.20 in the same LAN but outside the pool. This is the code I'm using:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/refresh" } {
log local0. "forwarding packet to 192.168.1.20"
node 192.168.1.20 80
}
else {
log local0. "pool used is [LB::server pool]"
pool [LB::server pool] member 192.168.1.10 80
}
}
I can correctly see all logs I say to write, and commands like [LB::server pool] are working as expected. But! I only see the packet been forwarding to the pool members in a round robin cycle (the balancing method for the pool).
Am I missing something?
Try with a oneconnect profile on your VS to see if it changes anything?