Will load balancing 'break' session variables on my site?

Our website is a classic ASP site that uses session variables to indicate user login status, etc. If we enable the Cloudflare load balancer, will that ‘break’ our session variables? That is, if the login page is served by 1 of the Cloudflare servers, will the login state be preserved if the user is served subsequent pages on our site from a different Cloudflare server? My understanding is that “sticky-variables” need to be defined in a traditional load-balanced server environment, but does that hold true for Cloudflare as well?
Thanks for any advice!

You need to enable Session Affinity:

https://developers.cloudflare.com/load-balancing/understand-basics/session-affinity/

4 Likes

Thank you sdayman!

How many origin servers do you have?

The Session Affinity feature is to direct tagged requests to a specific origin server. It doesn’t matter which Cloudflare POP is receiving the request.

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.