Sticky Sessions

13 views
Skip to first unread message

Jayson Helseth

unread,
Oct 13, 2022, 5:53:55 PM10/13/22
to Keycloak Dev
I have been reading the documentation for Keycloak and in other sources I found online that sticky sessions are recommended. What happens when a node has way more traffic than the others (unbalanced)? Does the user get assigned a new node and they get their session from the Infinispan cache, or do they just get logged out (lost session)?

Thanks,

Jayson

Tobias Häfner

unread,
Oct 17, 2022, 2:35:08 AM10/17/22
to Keycloak Dev
Hello Jayson,

it depends on your load balancer what to do in those cases. But Keycloak is prepared to handle to get the session from another node cause it uses infinispan. 
But for performance reasons it's good to configure sticky sessions.

Read this part of the documentation:

Best regards
Tobias
Reply all
Reply to author
Forward
0 new messages