I read : https://github.com/keycloak/keycloak-containers/tree/master/server
And some of the links about clustering and it doesn’t really explain how the session caches are replicated. I don’t want users logged out when a server disappears and I’m going to run a very dynamic environment in AWS ECS.
So I want to set the CACHE_OWNERS_AUTH_SESSIONS_COUNT to a high number, so that all sessions are replicated to all nodes.
Overnight, we have one node. 9AM hundreds of people login and 5 more nodes boot up. 9:15 they’re logged in and we scale back to a single node - which holds all sessions.
Then later, we spin up new nodes. Do all the existing sessions from the remaining node then get replicated? Or do they only replicate sessions when they are created?
This time when we scale down, the original node could be destroyed. And if it hadn’t replicated all the 9am sessions, they would be lost.
(The idea that sessions have “owner nodes” makes it sound like they’d get created with a list of owners, that were available at the time. If those nodes are unavailable, why would it rewrite the owner list? Is it that clever?! )
Do I need one guaranteed “master” node that is always available?