[keycloak-user] Does Keycloak need sticky session at the load balancer?

Rafael Weingärtner rafaelweingartner at gmail.com
Wed Aug 22 15:22:05 EDT 2018


Hello Keycloakers,

I have some doubts regarding Keycloak and load balancers. I set up two
keycloak replicas to provide HA. To start them I am using “./standalone.sh
--server-config=standalone-ha.xml”.  I am assuming that they will use
multicast to replicate information between nodes, right?

Then, I set up a load balancer layer using Apache HTTPD and AJP connector
via 8009 port. To make everything work I needed to use sticky session;
otherwise, the login would never happen. I am fine with the sticky session,
however, if I stop one of the replicas where the user is logged in, when
the user access Keycloak again, he/she is asked to present the credentials
as if he/she was not logged in the other Keycloak replica. Is that the
expected behavior?

Is there some troubleshooting or test that I can perform to check if
replication is being executed?

--
Rafael Weingärtner


More information about the keycloak-user mailing list