2

I have KeyCloak deployed to kubernetes.

When the pod restart for any reason (like a modification to the deployment) all user sessions are lost.

I see in documentation that session can only be stored in-memory. While it will be replicated, I found no documentation to ensure all sessions are replicated before the old pod goes down.

Strangely, My searches don't find people having any issue with this. Am I missing something?

My ideal solution would be to store the session data in a redis cluster.

Alireza
  • 5,421
  • 5
  • 34
  • 67
  • Do you have any update on this? I'm facing a similar problem. I have keycloak running on 3 nodes and the caches have 3 owners but everytime one node shuts down or I deploy new changes all user sessions are lost. – Flo Jul 05 '21 at 13:40
  • Keycloak supports infinispan out of box. If I had enough time, I liked to implement a infinispan wrapper over redis. This would enable us to use a managed redis and not maintain yet another HA subsystem. But time was ticking and we just deployed infinispan. – Alireza Jul 06 '21 at 00:32

0 Answers0