Rebalance traffic on Origins

If 2 origins configured behind a loadbalancer and one origin was disabled or failed health test for a while, all active sessions will move to the active origin. When the origin is back in service, how do I rebalance the active sessions across the two origins? We have sticky sessions enable which solved a problem we picked up during testing.

Sticky session accomplishes exactly the opposite you want. Once connections moves to the other origin it will stick to that origin for a while.

Not too much, though. Once that expires the load will come back normally.
I’d just wait for the sticky cookies to expire and new traffic to come in.

Thank you Matteo.

I changed session affinity to Temporary, but our tests show that the sessions that moved to the healthy origin that was originally on the origin that was disabled, did not move back to the original origin after I enabled it again. Am I missing any other setting I need to do.

Best regards


Sorry about the delay here, didn’t get notified about the reply…

The session affinity duration is reset for each new request, so the user needs to not do any requests for that amount of time (with the cookie that has expired).

If the origins are totally identical and there is no different, you could always remove affinity altogether, those are helpful if you have blackened changes that need to propagate and continued jumping is problematic.