Forum Discussion

Wizardiguy's avatar
Wizardiguy
Icon for Nimbostratus rankNimbostratus
Nov 13, 2018

Cookie persistence not being maintained if server doesn't send cookie back.

Hello! We are experiencing some sort of strange behavior. We are seeing persistence breaking in a Cookie Persistence profile and we suspect that it is because the server is not returning the cookie. What we see:

 

  • Client request
  • "SetCookie" in server response (inserted by F5).
  • Cookie forwarded in client "GET".
  • Cookie not sent back by server.
  • Cookie forwarded in clients subsequent "GET".
  • Cookie not sent back by server.

REFRESH (F5 in browser).

 

  • GET by client with previous cookie generated by the F5.
  • "SetCookie" header, thus, overwriting the session cookie (regenerated by the F5). and so on.

We are suspecting that what is breaking the presistence is the server not returning the cookie generated by the server. This has happened before, how can we fix that?

 

3 Replies

  • The order of events in your "what we see" description seems unusual. Perhaps we can start by determining the type of cookie persistence are you using - cookie insert, cookie rewrite, or cookie passive? Can you provide a listing of your cookie persistence profile's configuration?

     

  • Oh yeah! Sorry. We are using cookie insert with encryption and 3 minutes experation.

     

    These are the parameters: * Method: Insert * Cookie Name: * Timeout: 3 minutes * Encryption: require (it also has a passphrase).

     

    The funny thing is that it looks like persistence is lost sometimes because the F5 is generating a new cookie everynow and then, though the behavior reported happens when the client refreshes the page via a browser (F5).

     

  • Do you have "Always Send Cookie" checked? (The default is unchecked.) If unchecked, the BIG-IP system will NOT send the cookie out on each HTTP response. (It's more efficient that way since the cookie is still on the client.) However, since you are specifying an expiration time for the cookie, it means the cookie will expire in 3 minutes, no matter how many times the client sends the cookie to the BIG-IP system on a subsequent HTTP request, as the BIG-IP system never sends an updated cookie with a new expiration time. After 3 minutes, no more persisting; load balance instead, then a new cookie with new 3 minute persistence expiration. If you want the 3 minute expiration to be a sliding 3 minute window - one that gets refreshed on every subsequent HTTP request to the same VIP - then make sure "Always Send Cookie" is checked (enabled).