Configuring session persistance based on cookie

0 users found this article helpful


This article describes how to base User portal affinity on a cookie instead of using source addressing.


Detailed setup for HAProxy described here: load balancing, affinity, persistence, sticky sessions: what you need to know

Examine the Using application session cookie for persistence section from the article above for details related to session affinity based on cookie.

The User portal uses a cookie with ID ASP.NET_SessionId

       cookie ASP.NET_SessionId prefix no-cache

The load balancer must act in round-robin mode

       balance round-robin

Assuming that the IP addresses of the RAS Gateways are and respectively, The final configuration should  be as follows:

frontend ft_web
  default_backend bk_web
backend bk_web
  balance roundrobin
  cookie ASP.NET_SessionId prefix nocache
  server s1 check cookie s1
  server s2 check cookie s2

NOTE: Please contact your load balancing solution vendor for detailed configuration.

Was this article helpful?

Tell us how we can improve it.