I have a new rule in my F5:
when HTTP_RESPONSE {
if { [regsub -all "<title>" [HTTP::payload] "<title>[LB::server addr] -" newdata] } {
HTTP::payload replace 0 [HTTP::payload length] $newdata
}
}
This is tagged to a virtual server with “Rechunk” enabled. Most of the rules I’ve seen on http://devcentral.f5.com are forcing clients to HTTP/1.0 and disabling chunking, but simply “rechunk”ing the stream seems to allow the F5 to read the data, and not break the app. This is one of 2 rules I have using this feature. Anyways, to the problem:
Documentation on [LB::server name] has been updated. It used to say that [LB::server name] would return the name of the pool member that the client was attached to. I had to open a ticket saying it doesn’t work, and ask why not. Their answer was: yeah, the documentation is wrong. So how to get the feature I want – the pool member name in the title, rather than it’s private IP?
Right now, the only way to get the name of the pool member that the client is pinned to, is [NS::lookup [LB::server addr]]. Depending on utilitzation, however, since you’re rewriting every single page hit, and Linux doesn’t have a client-side caching resolver like Windows does, you might have to dedicate a DNS server just to the F5 for this (I would have to). Or use /etc/hosts. I am NOT a fan of putting anything in /etc/hosts, but for now, I may have to for this system.
Update coming when I get a better fix.
Leave a Reply