I want to select the pool only when user logs in for the first time i.e. when $location != "" and $authCookie != "" , I am assuming that for next subsequent requests this pool settings will be persisted and app_server_pool_1 will serve all the request for this session (since I have persistence based on JSESSIONID). Is there anything wrong with this approach or am I missing something here. I do have couple of HTTP redirects , are those breaking pool settings? I tried adding this code into above mentioned iRule
session exist
else {
persist uie $sessionId 3600
set location [HTTP::cookie "my_location"]
if {$location equals "mail_loc"} {
pool app_server_pool_1
}else {
pool app_server_pool_2
}
}
everything works fine but that means I am checking location every time a request comes in and assigning pool for that request, even though location does not change with in a session. I appreciate your help. Thanks.