Forum Discussion
I was referring to the line you posted:
[string tolower [HTTP::path]] equals "/" || [string tolower [HTTP::uri]] matches_glob "/$static::b_path"
Which is used in conjunction with:
Path variables.
There are a few other inefficiencies in the code. For instance, it really make sense to convert the path to lower case if you're only checking to see if it equals "/"...
Also, it's a bit curious to use a 301 and then tell the client to not cache it. If I'm not mistaken the RFC specifically states that 301 are to be cached. I'd recommend using a 307 (or even a 302).
Another thing I noticed is that the ratio is not truly a ratio in a load-balancing sense since it sends the first 6 users to one location and the next 4 to another location. In reality this likely works out to a ratio, though (if you have enough traffic).
Lastly, I'm wondering if the ratio is truly 60/40. Granted, I've only glanced at the iRule, but it looks like you're sending an extra request to A every 11th request (when the count is 10).