Forum Discussion

mvallee_141075's avatar
mvallee_141075
Icon for Nimbostratus rankNimbostratus
Nov 03, 2017

Selective load balance with cookie persistence

Hi, I have a request from a development team to come up with a way to test sending a client to a different server in a pool every time the persistence timer expires. The current VIP has a pool with 2 members and an irule that sets cookie persistence on only one of several URI's.

 

  • why that relation with the "persistence timer"? they don't want general access to the specific different servers?

     

  • You can't, easily.

     

    When the cookie persistence timer expires, the browser does not send the cookie, so the LTM makes a new load-balancing decision.

     

    Without the cookie, the LTM does not have any record of the last load-balance decision made, so it cannot deliberately choose a different server.

     

    You could write an irule that also records load-balancing decisions, and for every new load-balancing decision checks to see if the new decision is the same as the old one, and if not, then reselect. But this approach will take some significant memory in tmm as every client will need a record and the record could be required to remain for an arbitrary length of time - is this only for testing purposes or is this required in production?