I have a Virtual Server with a default pool and a cookie persistence profile, method Cookie insert. I have also an iRule for the Virtual Server, which load balance to the default pool if some URIs are matched and to another pool it there’s no match:
when HTTP_REQUEST {
switch -glob [HTTP::path] {
“/xxx/*” {
pool pool_default
}
“/yyy/*” {
pool pool_default
}
default {
pool pool_other
}
}
}
My question is: ¿Is the persitence profile used for all the pools or just for the default pool specified in the VS configuration?
Persistence is set at the virtual server level unless you modify that with an iRule using the persist command. If you use the default cookie insert persistence profile it should work find with your iRule. See the links in this post for details:
Make sure to test with a OneConnect profile enabled on the virtual server. If you’re using serverside source address translation, you can use the default OneConnect profile with a /0 source mask. Else, use a custom OneConnect profile with a /32 source mask.
Thanks. I will try with OneConnect profile. Anyway, I 've realised that persitencie will not resolve my issue. What I want is to avoid the iRule execution once a pool member has been selected. I mean, I don’t want the iRule beening processed for every object in the web page, or every page within the same session. But even it persistence is set and working ok, the iRule still executing on every GET/POST, isn’t it?
So, I think maybe a new condition looking fort he BIGip cookie at the beginning of the iRule will do the job:
I think that what I was looking for is more an “event disable all”. event disable affects only current connection. i thought you want even new connection (one session may contain many connection) is sent to specific pool member after persistence record has been created.