Forum Discussion

Dan44's avatar
Dan44
Icon for Altostratus rankAltostratus
Jan 08, 2020

persistence profile and pool selection based on url

Hi community,

i have a question about HTTP_REQUEST events in the iRule and hope someone can help me.

setup:

  • F5 virtual server (port 443) with OneConnect Profile and Persistence Profile (cookie) enabled
  • various pools with different web applications
  • iRule with a url based pool selection

when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/articles"  } {
        pool articles_app_pool


} elseif { [string tolower [HTTP::uri]] contains "/inseration"} {
     pool inseration_app_pool
	
} elseif { [string tolower [HTTP::uri]] contains "/magazin"} {
     pool magazin_app_pool
	
} elseif { [string tolower [HTTP::uri]] contains "/faq"} {
     pool faq_app_pool
	 
} else {
    pool default_pool


 }
}	 	 

if the user opens the website in the browser, and calls the domain (mydomain.com). He lands on the homepage (/home). No condition is met in the iRule and the user lands on the default pool and he receives a default_pool persistence cookie. The user now clicks on magazine ( menu bar) in the still open page. According to iRule, the request should be sent to the pool magazin_app_pool with /magazin. However, this does not happen. Is it possible that once the connection is established, the Rule can no longer function as long as the session remains active?

  • Hi,

     

    "However, this does not happen. Is it possible that once the connection is established, the Rule can no longer function as long as the session remains active?"

     

    I think that would be the case only if you are using "match across pools" option as session persistence.

     

    Br

  • Hi,

     

    Are you using the default cookie persist profile or did you create your own profile with a custom cookie name?

     

    Cheers,

     

    Kees

  • hi,

    we are using the default f5 persist profile

    cheers

  • Hi Dan,

     

    What are/is the name(s) of the cookie(s) when you browse to /home and then to /magazin?

     

    Cheers,

     

    Kees