I have made a few attempts to connect a Keycloak cluster to a remote infinispan
cluster over the last few years and have had problems each time.
This topic is IMHO currently not very well documented and the examples from
the admin doc use partially deprecated functionality [2] (remote-store).
To get something working one has to dive very deep into Wildfly, Infinispan and Keycloak
interna, which is hardly possibly for most Keycloak Users / Admins.
After a lot of trial and error, I have meanwhile built a locally executable example with docker-compose [3] that shows how to connect a Keycloak cluster to an external infinispan cluster that I wanted to share with the community.
The example uses the hotrod store configuration with a remote-cache-container
in Wildfly. The CLI configuration can be found here [4].
I also have a complete example that uses the "deprecated" remote store in [5] with
some caveats described here [6].
Btw. I also have an haproxy load-balancer configuration that's based on the official
Keycloak book but updated to the latest haproxy version with some additional tweaks (e.g. not using deprecated features) [7].
I think with some polishing this would be a good addition to the current Keycloak admin documentation.
What do you guys think about this?