Forum Discussion

Tony_Li_89728's avatar
Tony_Li_89728
Historic F5 Account
May 09, 2007

Persistence base on the SessionID in the URL

The customer request is using the SessionID in the URL to do the persistence,

 

the URL is like this.

 

 

http://10.2.2.132/examples/servlets/servlet/SessionExample?dataname=&datavalue=C5D5CC79F0771E63CE97D40B884EC0E0

 

 

Anybody has any idea on this request?

 

 

 

Thanks!

 

 

3 Replies

  • It would be best to create the persistence record in the first response event and match that record in subsequent requests. The request event is easier:

     

     

    persist uie [findstr [HTTP::uri] "datavalue" 10 "!"]

     

     

    Note that the ! should be whatever terminator exists after your sessionid.

     

     

  • Tony_Li_89728's avatar
    Tony_Li_89728
    Historic F5 Account

     

    I tested the rules on LTM 9.1.2 with HF3,but found out that the persistence does not work well.

     

     

    below is the rules and log.

     

     

    The Rules:

     

    when HTTP_REQUEST {

     

    log local0. "uriis-----[HTTP::uri]-----------------"

     

    set jsess [findstr [HTTP::uri] "datavalue=" 10 "!"]

     

    if { $jsess != "" } {

     

    persist uie $jsess 3000000

     

    log local0. "session : $jsess"

     

    }

     

    }

     

    when HTTP_RESPONSE {

     

    if { $jsess != "" } {

     

    log local0. "session--$jsess--[IP::remote_addr] "

     

    }

     

    }

     

     

    The Log:

     

    May 23 16:48:01 tmm tmm[704]: Rule zw_rules : session : aaaaa May 23 16:48:01 tmm tmm[704]: Rule zw_rules : session--aaaaa--192.168.0.70

     

    May 23 16:48:08 tmm tmm[704]: Rule zw_rules : session : aaaaa May 23 16:48:08 tmm tmm[704]: Rule zw_rules : session--aaaaa--192.168.0.69

     

    May 23 16:51:41 tmm tmm[704]: Rule zw_rules : session : aaaaa May 23 16:51:41 tmm tmm[704]: Rule zw_rules : session--aaaaa--192.168.0.70

     

     

    Just want to know if anyone have done this successfully on LTM 9.1.2 with HF3 without any problems?

     

     

    I am trying to run it on LTM 9.3.0.