Forum Discussion

Julian_Standrin's avatar
Julian_Standrin
Icon for Nimbostratus rankNimbostratus
Mar 23, 2007

Persist on unique uri argument

I'm having trouble with a very basic persist statement. The behaviour I'm seeing in my test environment is a reload-balance on each request and this breaks my application session.

 

 

I'm a newcomer to the F5 and BigIP iRules so any help would be greatly appreciated.

 

 

Can anyone see anything wrong with the iRule below? Using the persist uie $sid line should be sufficient from what I can tell and I do see entries in my persistence table with the correct arg value but the session is still not persisting. I'm using version 9.1.2. Not every uri query has a my.sessionId arg but I don't think this should make a difference.

 

 

when HTTP_REQUEST {

 

set sid [findstr [HTTP::uri] "my.sessionId=" 17 "&"]

 

log local0. "Session ID=$sid"

 

persist uie $sid

 

}

 

 

  • The problem with this iRule relates to the application process. As the persistence is required on the server that originated the response this rule works too late in the exchange between client and server. So, the client makes a first request to the server, this request is load balanced and there is no sessionId, the server then creates a session & sessionId for the client and sends the response. When the client makes the second request it is load balanced again and there is a sessionId so the connection will persist. However, the desired behaviour is not to load balance at this point but persist to the original web server, instead the request goes to a web server that has no knowledge of the session and the application breaks.