For load balancer session persistence ... why it is recommended to use the Source IP algorithm?
in the doc
https://www.linode.com/docs/platform/nodebalancer/nodebalancer-reference-guide/
it says:
If you need Session Persistence it is our recommendation to utilize both the Source IP algorithm in combination with either Table or HTTP Cookie if possible.
but why? I want to use 'Round Robin' algorithm + 'HTTP Cookie' session stickiness … it should almost guarantee the session persistence?
thanks for any feedback!
1 Reply
Hey there — great question. We recommend setting the NodeBalancer's algorithm to Source IP and session stickiness to Table or HTTP Cookie for maximum dependability on sticky sessions. In your contemplated configuration, session stickiness would fail if users accessing your NodeBalancer have disabled cookies in their browser. In this case, only the Round Robin algorithm would apply, so they wouldn't likely reach the same backend Linode.
So, by also configuring your algorithm to Source IP, you're increasing the likelihood that user sessions will indeed be sticky — even if cookies are disabled in users' browsers, the algorithm will maintain persistent connections if they're connecting from the same IP address and the established backend is still available.