Andrea_Knapp_28
Mar 12, 2008Nimbostratus
Session intermixing issue - due to Cookie not being sent every call?
we are currently having issues with our v9.3 implementation when we go into production we have session intermixing issues with users who are behind a proxy. Tech Support has stated that there is a difference between v4.5.13 and v9.3 in how the cookie is presented.
This is what tech support has stated :
"In version 4, if the client makes a request and includes the BigIP persistence cookie in the cookie list, the BigIP reads the cookie and load balances accordingly. However, the BigIP continues to set the same cookie in subsequent HTTP 200 responses to the requestor.
In version 9, if the client makes a request and includes the BigIP persistence cookie in the cookie list, the BigIP reads the cookie and load balances accordingly. However, in version 9 the BigIP does not continue to set the same cookie in subsequent HTTP 200 responses"
Their suggestion was to use an iRule in which the cookie is examined everytime and then reinserted back to the customer in v9.3. Here is the iRule that they provided
when HTTP_REQUEST {
if { [HTTP::cookie exists "BIGipServerP_HTTP"] } {
If the cookie does exist, let's grab the contents.
set old_cookie [HTTP::cookie BIGipServerP_HTTP]
}
}
when HTTP_RESPONSE {
Now re-insert it
HTTP::cookie insert name BIGipServerP_HTTP value $old_cookie
set new_cookie [HTTP::cookie BIGipServerP_HTTP ]
}
In which the value for BIGipServerP_HTTP is the same value as the persistent profile cookie that is set for that virtual.
I tried the iRule as written above but it completely broke the site. I believe it broke the site because the rule is based on having a cookie already. If the cookie does not exist how does it get created?
To get it to some what work we had to change it to the following:
when HTTP_REQUEST {
if { [HTTP::cookie exists "BIGipServerP_HTTP"] } {
If the cookie does exist, let's grab the contents.
set old_cookie [HTTP::cookie BIGipServerP_HTTP]
} else {set old_cookie 0}
}
when HTTP_RESPONSE {
Now re-insert it
HTTP::cookie insert name BIGipServerP_HTTP value $old_cookie
set new_cookie [HTTP::cookie BIGipServerP_HTTP ]
}
This is still causing issues as we now can get to the site, but sessions are expiring
Since I am not proficient in creating iRules I need some assistance. I believe what needs to happen is that the cookie needs to be inserted. Is there are way to do the following:
if the cookie exists set to old_cookie
if not then use persitent profile BIGipServerP_HTTP
if old_cookie exists then re-insert and send back to customer.
Thank you,
Andrea