Forum Discussion

Eric_Waite_1046's avatar
Eric_Waite_1046
Icon for Nimbostratus rankNimbostratus
Jan 23, 2007

URGET help please

I am trying to persist jsessionIds from an applet application that has sessions that can last an hour before timing out.

 

 

I am using the following iRule to manage persistence by jsessionid. Upon login I send a server side cookie with the jsessionid as a cookie, JID. I then remove that cookie, to make sure I don't have any issues of creating unwanted or incorrect sessions.

 

 

Every subsequest request has a jsessionid in the URI as follows:

 

/rs/dispTOC.do;jsessionid=213F2678EE7DD1891390177B2214BE9F.4?id=pref

 

If a logout or a logoff appears in the URI, then I change the timeout to 2 minutes.

 

 

The problem is, the same request may persist fine 80-90 percent of the time, then all of a sudden, the key/value pair is persisted to the wrong server. I can tell this, because if you notice in my sessionid, I have a .4 for one server and a .5 for another server. This indicates the server the session id was generated on.

 

 

I am running this in production even though I am operating at 90 percent. I have no choice because load is too high to operate without a load balancer.

 

 

I have spoken to support, the suggest I once again write devcentral. The problem is not easily repeatable, so logs are hard to generate.

 

 

The question I have is, am I wrong that the timeout of the records in the persistence table can be varied by each record?

 

 

Is my iRule valid?

 

 

Is there a way other then

 

b persist show all

 

to see the key/value pairs in the table AND not the amount of time they have been i nthe table BUT the amount of time left in the table?

 

 

Any help would be appreciated.

 

 

Thanks

 

 

 

 

 

 

when HTTP_RESPONSE {

 

if { [HTTP::cookie exists "JID"] } {

 

if { [persist lookup uie [HTTP::cookie "JID"]] equals "" } {

 

persist add uie [HTTP::cookie "JID"] 3700

 

}

 

}

 

}

 

 

when HTTP_REQUEST {

 

if { [findstr [HTTP::uri] "jsessionid" 11 "?"] != "" } {

 

if { [findstr [HTTP::uri] "logout.do"] != "" } {

 

persist uie [findstr [HTTP::uri] "jsessionid" 11 "?"] 120

 

} else {

 

if { [findstr [HTTP::uri] "logoffId.do"] != "" } {

 

persist uie [findstr [HTTP::uri] "jsessionid" 11 "?"] 120

 

} else {

 

persist uie [findstr [HTTP::uri] "jsessionid" 11 "?"] 3700

 

}

 

}

 

}

 

}
  • I was hoping someone could help me. I was told by support, the forum was staffed by F% personal and this was the place to post.

     

     

    Any help would greatly be appreciated.

     

     

    - Eric