Forum Discussion

C_D_18583's avatar
C_D_18583
Icon for Nimbostratus rankNimbostratus
Jul 19, 2007

Session Timeouts at the app level

Is it possible to override the default profile by creating profiles with different session timouts and assigning them at the irule as shown below:

 

 

Or is there another way to assign session timeouts at the app level ?

 

 

Please Advise

 

 

 

----SESSION PROFILES --------

 

 

profile persist app1 {

 

defaults from cookie

 

mode cookie

 

timeout 144000

 

cookie mode insert

 

cookie name App1

 

}

 

profile persist app2 {

 

defaults from cookie

 

mode cookie

 

timeout 3600

 

cookie mode insert

 

cookie name App2

 

}

 

profile persist app3 {

 

defaults from cookie

 

mode cookie

 

timeout 4600

 

cookie mode insert

 

cookie name App3

 

}

 

 

 

 

-------IRULE--------------

 

rule test{

 

when HTTP_REQUEST {

 

if { [HTTP::uri] starts_with “/app1” } {

 

persist cookie insert App1

 

pool app1

 

} elseif { [HTTP::uri] starts_with “/app2” } {

 

persist cookie insert App2

 

pool app2

 

} elseif { [HTTP::uri] starts_with “/app3” } {

 

persist cookie insert App3

 

pool app3

 

}

 

}

 

}

 

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    I don't see a reason why the above wouldn't work, as you're simply selecting which cookie to use for persistence, effectively.

     

     

    You could, however, use the HTTP::cookie insert command to insert a custom crafted cookie with whatever parameters you wanted. That would require you add some logic to enforce the persistence, though.

     

     

    Colin