Replies: 1 comment 2 replies
-
It is a decision we made. It does not make sense to keep sessions in two external systems due to the cost of updating them on each access (you have to keep track of the last access time for expiration reasons). It would also complicate the logic and be tricky to keep them in sync. So we decided to keep the session only in one system: when |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently running Keycloak
26.4.11with thepersist-user-sessionsfeature enabled by default. With this setup, the user session is persisted in the database as the source of truth, while some of them are also stored in the embedded infinispan cache for faster access.I am now testing with both the
persist-user-sessionsandclusterlessfeatures enabled. In this case, I can see the session gets persisted in the database, but no session records appear in the "sessions" cache on the remote infinispan server.So here is my question, in this case, does Keycloak still maintain a cache of the user sessions on each node, although the cache is no longer a distributed one like before? Assume yes, then how does it keep the caches in sync?
I know having both feature enabled is not in the well-quoted blog post, but based on my own test and the previous discussions of this subject like here and here, I also see evidence the combination is working. But seeing the "sessions" cache in the remote infinispan server being empty, I worry about the performance impact (on database load) without knowing anything about the caches on the Keycloak side.
Beta Was this translation helpful? Give feedback.
All reactions