Can we use two separate Keycloak HA clusters with same DB as there backend?

Hi,

each Keycloak realm is independent, so, if your requirement don’t ask for totally separated instances (so that, say, you can give full admin powers to a tenant without impacting others), you can have a single keycloak cluster.

That is, you can have N instances with 1 database working as a single software, with a single admin panel.

Unless you have a complex giga deployment, you probably don’t need external infinispan.

So, what you need is to configure a load balancer in front of the keycloak instances and let them use the same database. If they are virtual machines in the same subnet, they also will automagically configure themselves in a infinispan cluster (if not, see Is external infinispan required for Keycloak HA? - #2 by weltonrodrigo)

If you need separate instances, you can use the same SERVER, just different DATABASES in the server.

1 Like