Keycloak Infinispan cache replication is not working

nfinispan isn’t replicating caches across the cluster; the user is asked to login again when Keycloak on any node in the cluster isn’t healthy. Can you please help point out what we are doing wrong?

We followed the documentation for Keycloak Infinispan setup (Server Installation and Configuration Guide) and set the owners for all caches to 3. Below is an example excerpt of our cache owner setup (domain/configuration/domain.xml)

<subsystem xmlns="urn:jboss:domain:infinispan:11.0">
   <cache-container name="keycloak">
       <distributed-cache name="sessions" owners="3"/>
...

Details about our Keycloak setup

  • Domain clustered mode
  • 1 primary, 2 secondary
  • Hosted on AWS and ALB has sticky session enabled.

Any help is appreciated.