cancel
Showing results for 
Search instead for 
Did you mean: 

load balancing decision and cookie persistence

ayoub
Nimbostratus
Nimbostratus

Hi

I have a case where the client is sending a cookie. I need to match on that cookie, then do a manual load balancing decision based on data in the cookie and at the same time persist on that chosen member. Can I do that with simple persistence without using iRule? if no how can I do it with irule?

Thank you.

4 REPLIES 4

Hello Ayoub.

 

You can do it with an iRule. Cookie Hash is what your are looking for

REF - https://support.f5.com/csp/article/K6586

 

Create a new cookie persistence profile and set 'Cookie Hash' as cookie method.

Then, use 'Cookie Name' to specify what cookie will be used as reference.

 

Regards,

Dario.

Regards,
Dario.

ayoub
Nimbostratus
Nimbostratus

with the hash cookie persistence I cannot decide based on the cookie of the 1st request to which pool member should I send the request. I think doing an irule with selectif load balancing based on received cookies from client is enough? or am I missing something?

Regarding the decision about using cookie hash or cookie passive, both are similar and both could fit in your scenario (depend on your requirements).

Anyway, all depends on what your decision is when the first request comes into play. What logic do you have in mind? base on this you could need an iRule or not.

 

Take into account that when no persistence record is found, a new load balancing decision is made.

https://support.f5.com/csp/article/K30483109

Regards,

Dario.

Regards,
Dario.

ayoub
Nimbostratus
Nimbostratus

Or maybe if I try a http cookie passive method with fallback src_ip persistence. In this case If in the 1st request from the customer the correct cookie key value that maps to the correct pool member is added in the header, will it work to direct to the correct pool and persist on it? and if the cookie is not inserted in the header or not the correct one, then it will fallback to src_ip persistence? In this case we will avoid irule. My question here if the logic is right, then what will happen regarding load balancing if no persistence record is matched.