Forum Discussion

Larry_LeFever_5's avatar
Larry_LeFever_5
Icon for Nimbostratus rankNimbostratus
May 04, 2007

sticky sessions not always sticky?

I have evidence from log-analysis of sticky sessions failing to be sticky about 5% of the time.

 

 

The log-analysis shows a given HttpSession-id being handled on two different nodes of the cluster at practically the same time.

 

 

The the set of cookies, in such cases, for a given request, includes TWO different BIGipServer cookies, one corresponding with the first node the HttpSession began being handled on, and the other corresponding with the second node.

 

 

We're trying to track visitors to our site, though without a full-fledged user-login implementation.

 

 

The problem we're having is that this seeming failure of sticky sessions is causing redundant creation of a Visit object and redundant writing of it to our database, thanks to effectively a new session being started on the second node, and consequently a second instance of Visit being created for the given session. So, any reports based upon this implementation would overstate unique visitors.

 

 

According to my log-analysis, this seems to be happening about 5% of the time.

 

 

I worry that there's some race condition occurring somewhere.

 

 

One idea is that the browser is making the page-request and the associated supporting-file requests in different threads, and that occasionally a request for a supporting file is made before the response to the initial page-request has finished processing the received cookie, so the browser doesn't send the BigIP cookie with that subsequent request, so BigIP thinks that request is of a new session and routes it to another node.

 

 

I hope I can write an iRule to fix this.

 

 

Any help would be much appreciated.

 

 

I can send more details (log-analysis, etc.) if interested.

 

 

2 Replies

  • I do not see any solution posted for this query.

     

     

    Has this been resolved? We are also facing the same problem in our application!

     

     

    Will appriciate if you can share me the solution / iRule to resolve this.

     

     

    Thanks in Advance!

     

     

    Regards,

     

     

    Bala
  • Hi Bala,

     

     

    Which version of BIG-IP software are you running? Is it HTTP traffic? You might consider opening a case with F5 Support on this to get help doing some in depth troubleshooting.

     

     

    Aaron