Forum Discussion

Ronnie110755's avatar
Ronnie110755
Icon for Altostratus rankAltostratus
Jan 24, 2023

Traffic Policies: More detailed information on Actions

I am in a situation where I need to employ Session Persistence via cookie insert method in a traffic policy rule. I understand the cookie insert session persistence , that's not a problem but there ...
  • Paulius's avatar
    Paulius
    Jan 24, 2023

    Ronnie110755 I would say your assumptions are probably a good guess because that's how all other cookie insert works on the F5, or at least the ones that I have used. You should be able to test this fairly easy though by configuring the traffic policy with the defaults and then access the site to see what it returns in the response cookie. I believe the cookie insert does indeed work at the VS level because you have to associate the policy to the VS that you want to use the configured policy. From my understanding you have 3 ways to insert a cookie for cookie persistence. The first is through and HTTP profile, an iRule, and the method you are using which is local traffic policy. As far as when the cookie is inserted that is dependent on what you choose for that last field in the traffic policy. I know my method probably isn't the best method of discovery but sometimes when documentation is limited you do what you have to so you can figure it out. Thank you for the appreciation on that approach but always remember to not do this on a critical VS and try it on something that doesn't matter or configure a new VS for testing only which I always recommend.

  • John_Alam's avatar
    John_Alam
    Jan 24, 2023

    The BIGipserver cookie is inserted by the persistence profile attached at the virtual server level.  If you don't want that, you can remove the profile.   You can then create your own cookie name using policy or irule.

    Cookies inserted by the server in the HTTP Response are not really cookies, they are "Set-Cookie" headers that instruct the browser to form a cookie and send it back in the next resquest.  It is iimportant to highlight the difference.

    A policy or an iRule on the BIGIP virtual server can insert either a real cookie into the request or a "Set-Cookie" header into the response.  In the request it would be simulating browser returning a cookie.  In the response it would be simulating server Setting a cookie.

    HTH

     

  • John_Alam's avatar
    John_Alam
    Jan 24, 2023

    Thanks for pointing that out.  We will pass this along to the UI and documentation people.