Forum Discussion

Loren_Anderson_'s avatar
Loren_Anderson_
Icon for Nimbostratus rankNimbostratus
Mar 22, 2007

Simple problem, no solution yet...

We have a simple problem that is causing us a lot of frustration. We are running on BigIp 6400 V9.1.2.

 

 

In a nutshell, the problem we need to solve is to persist an HTTP request to a pool member based on a session id GUID that is added to the URI after successful login to the application. The URI will look something like: https://www.someplace.com/a/b/foo?sessionId=746sd8fdhdjhfjhdfhkjshf

 

 

Here is the iRule I have created, but it does not seem to work:

 

 

when HTTP_REQUEST {

 

set uri findstr [HTTP::uri] "sessionId=" 10 "&"]

 

log local0. "Session ID=$uri"

 

persist uie $sid

 

}

 

 

I can see the sessionid correctly logged in the ltm logs, but the session does not persist. I have persistence profile set to none, but I have also tried universal persistence with the above iRule attached to this profile, but to no avail. Anyone have any ideas?

 

 

Thanks!

 

2 Replies

  • Sorry, this is a correct version of the script. I copied that one from an older email:

     

     

    when HTTP_REQUEST {

     

    set sid findstr [HTTP::uri] "sessionId=" 10 "&"]

     

    log local0. "Session ID=$sid"

     

    persist uie $sid

     

    }

     

  • It seems your persistence isn't being set until after the sessionID is submitted by the client, so this will be another load balancing decision, which potentially takes your session to another server. Try capturing the session id in the http_response event and using persist add uie $sid