# \#clustering

**URL:** https://forum.keycloak.org/tag/clustering/66.md

[Latest](https://forum.keycloak.org/latest.md) · [Categories](https://forum.keycloak.org/categories.md) · [Tags](https://forum.keycloak.org/tags.md)

---

## [Does Keycloak still create embedded infinispan cluster when using remote infinispan server](https://forum.keycloak.org/t/does-keycloak-still-create-embedded-infinispan-cluster-when-using-remote-infinispan-server/31267)

<div class="topic-metadata">

**Author:** [@anand-kulk](https://forum.keycloak.org/u/anand-kulk)\
**Replies:** 2\
**Last updated:** [February 4, 2026, 9:01pm UTC](https://forum.keycloak.org/t/does-keycloak-still-create-embedded-infinispan-cluster-when-using-remote-infinispan-server/31267 "2026-02-04T21:01:08Z")

</div>

Hello there - I am running Keycloak 23.0.3, 2 pods in Kubernetes and it uses remote infinispan cluster for sessions and client sessions cache. Below is my infinispan config xml. I am using 2 owners for remote sessions/c…

---

## [How keycloak works in a cluster with cache](https://forum.keycloak.org/t/how-keycloak-works-in-a-cluster-with-cache/29553)

<div class="topic-metadata">

**Author:** [@alansatis](https://forum.keycloak.org/u/alansatis)\
**Replies:** 5\
**Last updated:** [February 7, 2025, 2:15pm UTC](https://forum.keycloak.org/t/how-keycloak-works-in-a-cluster-with-cache/29553 "2025-02-07T14:15:00Z")

</div>

Hello everyone! I hope you are all well! I’m trying to use Keycloak version 26.1.0 in cluster mode. My scenario: I have an internal load balancer that points to an Azure Scale-Set. In this scale-set, I have two VMs. I…

---

## [Unable to acquire jdbc connection everytime during deployment](https://forum.keycloak.org/t/unable-to-acquire-jdbc-connection-everytime-during-deployment/28805)

<div class="topic-metadata">

**Author:** [@Rupal](https://forum.keycloak.org/u/Rupal)\
**Replies:** 0\
**Last updated:** [November 19, 2024, 6:54am UTC](https://forum.keycloak.org/t/unable-to-acquire-jdbc-connection-everytime-during-deployment/28805 "2024-11-19T06:54:59Z")

</div>

We have keycloak 21.1.1 running on HA mode with Postgres as storage on K8. Every time during deployment we get error of unable to aquire jdbc connection. which goes on retrying deployment 2nd time. The postgres is config…

---

## [Unable to apply clustering and distributed cache configuration](https://forum.keycloak.org/t/unable-to-apply-clustering-and-distributed-cache-configuration/26927)

<div class="topic-metadata">

**Author:** [@tabletoni](https://forum.keycloak.org/u/tabletoni)\
**Replies:** 2\
**Last updated:** [July 9, 2024, 4:07pm UTC](https://forum.keycloak.org/t/unable-to-apply-clustering-and-distributed-cache-configuration/26927 "2024-07-09T16:07:39Z")

</div>

Hi I’m trying to configure clustering and distributed cache configuration in a 2 nodes keycloak 24.0.3 installation, following Configuring distributed caches - Keycloak. This is the head of my cache.xml file \<jgroups\> …

---

## [Can I manage multiple clusters simultaneously? Let's say 5 cluster](https://forum.keycloak.org/t/can-i-manage-multiple-clusters-simultaneously-lets-say-5-cluster/26807)

<div class="topic-metadata">

**Author:** [@mertyakan](https://forum.keycloak.org/u/mertyakan)\
**Replies:** 4\
**Last updated:** [July 8, 2024, 6:25am UTC](https://forum.keycloak.org/t/can-i-manage-multiple-clusters-simultaneously-lets-say-5-cluster/26807 "2024-07-08T06:25:51Z")

</div>

Hello, Let’s say I have 5 clusters. I would like to use one of them as an admin cluster. Can I include Keycloak and manage user administration for the developer team with it? Is this possible?

---

## [Kerberos in a clustered setup](https://forum.keycloak.org/t/kerberos-in-a-clustered-setup/25688)

<div class="topic-metadata">

**Author:** [@itobi1](https://forum.keycloak.org/u/itobi1)\
**Replies:** 0\
**Last updated:** [April 22, 2024, 3:31pm UTC](https://forum.keycloak.org/t/kerberos-in-a-clustered-setup/25688 "2024-04-22T15:31:59Z")

</div>

Hello everybody, I have a Keycloak setup with two clustered servers and one NGINX load balancer in front of them. Currently, I’m trying to configure Kerberos (Active Directory), but I’m not really sure how to do it in …

---

## [Error :: Failed to run scheduled task ClearExpiredUserSessions](https://forum.keycloak.org/t/error-failed-to-run-scheduled-task-clearexpiredusersessions/16879)

<div class="topic-metadata">

**Author:** [@kkcmadhu](https://forum.keycloak.org/u/kkcmadhu)\
**Replies:** 1\
**Last updated:** [April 17, 2024, 4:14am UTC](https://forum.keycloak.org/t/error-failed-to-run-scheduled-task-clearexpiredusersessions/16879 "2024-04-17T04:14:25Z")

</div>

After upgrading to keyclok18, i see this info/warning in my log like {"timestamp":"2022-08-11T22:48:07.222Z","sequence":8609,"loggerClassName":"com.arjuna.ats.arjuna.logging.arjunaI18NLogger\_$logger","loggerName":"com.a…

---

## [Liquibase failed to update database](https://forum.keycloak.org/t/liquibase-failed-to-update-database/16244)

<div class="topic-metadata">

**Author:** [@anguyen](https://forum.keycloak.org/u/anguyen)\
**Replies:** 1\
**Last updated:** [March 6, 2024, 8:23pm UTC](https://forum.keycloak.org/t/liquibase-failed-to-update-database/16244 "2024-03-06T20:23:58Z")

</div>

Hi, I’m trying to setup a high availability keycloak cluster composed of two keycloak instances (18.0.2) behind a reverse proxy (HAproxy) and a MariaDB Galera cluster. Communications between the keycloak instances and th…

---

## [Keycloak 18 - Distributed cache on Azure cloud](https://forum.keycloak.org/t/keycloak-18-distributed-cache-on-azure-cloud/18120)

<div class="topic-metadata">

**Author:** [@Ergo0ne](https://forum.keycloak.org/u/Ergo0ne)\
**Replies:** 8\
**Last updated:** [February 12, 2024, 9:25am UTC](https://forum.keycloak.org/t/keycloak-18-distributed-cache-on-azure-cloud/18120 "2024-02-12T09:25:09Z")

</div>

Hi everyone, I was wondering if someone tried implementing distributed cache with infinispan Cloud discovery protocols. I am really having trouble understanding what to configure since a lot of topics and websites talk…

---

## [Keycloak High Availability with PostgreSQL on Kubernetes](https://forum.keycloak.org/t/keycloak-high-availability-with-postgresql-on-kubernetes/24266)

<div class="topic-metadata">

**Author:** [@zackbradys](https://forum.keycloak.org/u/zackbradys)\
**Replies:** 0\
**Last updated:** [January 29, 2024, 9:26am UTC](https://forum.keycloak.org/t/keycloak-high-availability-with-postgresql-on-kubernetes/24266 "2024-01-29T09:26:02Z")

</div>

GitHub Issue… Keycloak High Availability with PostgreSQL on Kubernetes · Issue #26550 · keycloak/keycloak · GitHub Describe the bug Keycloak (and Postgres) will deploy without issue and become ready, but when accessing …

---

## [Adventures with Docker Swarm and Keycloak Clustering](https://forum.keycloak.org/t/adventures-with-docker-swarm-and-keycloak-clustering/6702)

<div class="topic-metadata">

**Author:** [@kiwicloak](https://forum.keycloak.org/u/kiwicloak)\
**Replies:** 13\
**Last updated:** [January 17, 2024, 9:09am UTC](https://forum.keycloak.org/t/adventures-with-docker-swarm-and-keycloak-clustering/6702 "2024-01-17T09:09:27Z")

</div>

I have spent some considerable time attempting to run the Keycloak container clustered in swarm mode. TL;DR I ended up adding dn.DNS\_PING and changing the docker-entrypoint.sh to set the bind address to match the dnsrr…

---

## [Redundant connection to Keycloak](https://forum.keycloak.org/t/redundant-connection-to-keycloak/23886)

<div class="topic-metadata">

**Author:** [@oskarh](https://forum.keycloak.org/u/oskarh)\
**Replies:** 4\
**Last updated:** [January 6, 2024, 8:54am UTC](https://forum.keycloak.org/t/redundant-connection-to-keycloak/23886 "2024-01-06T08:54:37Z")

</div>

Hello. I have two instances of Keycloak running with a shared database and ispn cache for redundancy. I then have a web client app implemented in Spring Security which works fine when I configure it to go either agains…

---

## [Token get unauthorized in cluster even for active session](https://forum.keycloak.org/t/token-get-unauthorized-in-cluster-even-for-active-session/23256)

<div class="topic-metadata">

**Author:** [@ddushan123](https://forum.keycloak.org/u/ddushan123)\
**Replies:** 0\
**Last updated:** [November 6, 2023, 1:47pm UTC](https://forum.keycloak.org/t/token-get-unauthorized-in-cluster-even-for-active-session/23256 "2023-11-06T13:47:19Z")

</div>

I’m using keycloak 16.1.1 with two node cluster. If one node shutdown I’ll get 401 unauthorized response with the below message for valid token. { "error": "invalid\_request", "error\_description": "User session n…

---

## [Keycloak clustering in 21.1.1 vs 20.x.x](https://forum.keycloak.org/t/keycloak-clustering-in-21-1-1-vs-20-x-x/22758)

<div class="topic-metadata">

**Author:** [@sherif](https://forum.keycloak.org/u/sherif)\
**Replies:** 0\
**Last updated:** [June 19, 2023, 10:41am UTC](https://forum.keycloak.org/t/keycloak-clustering-in-21-1-1-vs-20-x-x/22758 "2023-06-19T10:41:42Z")

</div>

I upgraded my dev env from 20.x.x to latest 21.1.1 but the clustering using UDP isn’t happy with the following settings: thread\_dumps\_threshold="${jgroups.thread\_dumps\_threshold:10000}" max\_bundle\_size="8500" enable\_dia…

---

## [Keycloak cluster setup in in dtsributed mode on latest version](https://forum.keycloak.org/t/keycloak-cluster-setup-in-in-dtsributed-mode-on-latest-version/22697)

<div class="topic-metadata">

**Author:** [@sujeet3035](https://forum.keycloak.org/u/sujeet3035)\
**Replies:** 0\
**Last updated:** [June 15, 2023, 11:22am UTC](https://forum.keycloak.org/t/keycloak-cluster-setup-in-in-dtsributed-mode-on-latest-version/22697 "2023-06-15T11:22:17Z")

</div>

I am trying to set up the keycloak on 3 node on premise but somehow they are no coordinating. I have provided jgroups config in cache-ispn.xml file. Can someone ping me sample file of cache-ispn.xml. Help me what could…

---

## [Clustered Keycloak on on K8S](https://forum.keycloak.org/t/clustered-keycloak-on-on-k8s/22128)

<div class="topic-metadata">

**Author:** [@smbugua](https://forum.keycloak.org/u/smbugua)\
**Replies:** 1\
**Last updated:** [June 7, 2023, 5:06pm UTC](https://forum.keycloak.org/t/clustered-keycloak-on-on-k8s/22128 "2023-06-07T17:06:24Z")

</div>

Hello everyone , i have tried clustering keycloak onk8s for over 1 year and this keeps failing , for instance I now get 401 errors with instances of successful login versus others of failed logins . please advice what m…

---

## [Keycloak 21.0.1 Clustering](https://forum.keycloak.org/t/keycloak-21-0-1-clustering/21921)

<div class="topic-metadata">

**Author:** [@sreejith.nair](https://forum.keycloak.org/u/sreejith.nair)\
**Replies:** 2\
**Last updated:** [May 9, 2023, 4:52pm UTC](https://forum.keycloak.org/t/keycloak-21-0-1-clustering/21921 "2023-05-09T16:52:54Z")

</div>

We have configured Keycloak 21.0.1 on two Linux instance under an azure load balancer. When two instance are up and running I am getting error while authenticating client applications. Could anyone please help to find a…

---

## [Proxy bad request](https://forum.keycloak.org/t/proxy-bad-request/21900)

<div class="topic-metadata">

**Author:** [@dbathily](https://forum.keycloak.org/u/dbathily)\
**Replies:** 1\
**Last updated:** [May 5, 2023, 3:08pm UTC](https://forum.keycloak.org/t/proxy-bad-request/21900 "2023-05-05T15:08:55Z")

</div>

Hi All, I have a Keycloak 21 being a loadbalancer that send those headers host: \*\*\* accept: text/html,application/xhtml+xml,application/xml;q=0.9,\*/\*;q=0.8 user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) Ap…

---

## [Clustering keycloak on 3 machines](https://forum.keycloak.org/t/clustering-keycloak-on-3-machines/21733)

<div class="topic-metadata">

**Author:** [@mapkyca](https://forum.keycloak.org/u/mapkyca)\
**Replies:** 4\
**Last updated:** [May 2, 2023, 8:08am UTC](https://forum.keycloak.org/t/clustering-keycloak-on-3-machines/21733 "2023-05-02T08:08:36Z")

</div>

Dear all, I have been bashing my head against this for a while now, but so far I have had no luck, and I am hoping someone could point me in the right direction. I have three VPS’ each running docker (not Kubernetes) …

---

## [Is using Keycloak embedded with spring boot a bad idea or not?](https://forum.keycloak.org/t/is-using-keycloak-embedded-with-spring-boot-a-bad-idea-or-not/21673)

<div class="topic-metadata">

**Author:** [@rasoolghafari](https://forum.keycloak.org/u/rasoolghafari)\
**Replies:** 0\
**Last updated:** [April 24, 2023, 11:49am UTC](https://forum.keycloak.org/t/is-using-keycloak-embedded-with-spring-boot-a-bad-idea-or-not/21673 "2023-04-24T11:49:22Z")

</div>

I working on a legacy project that uses Keycloak 11. recently, I found this repository I realized that we can use Keycloak embedded with Spring Boot. So, I moved the project this way but there was a problem. When I tried…

---

## [Enabling Multicast for Keycloak Clustering](https://forum.keycloak.org/t/enabling-multicast-for-keycloak-clustering/12208)

<div class="topic-metadata">

**Author:** [@Deeps](https://forum.keycloak.org/u/Deeps)\
**Replies:** 11\
**Last updated:** [April 20, 2023, 10:45am UTC](https://forum.keycloak.org/t/enabling-multicast-for-keycloak-clustering/12208 "2023-04-20T10:45:56Z")

</div>

Hi, How to enable multicast for keycloak standalone clustering? Is it possible to do keycloak clustering without enabling multicast? Thanks in advance, Deeps.

---

## [Cookie Not Found - HA - GCP Load Balancer](https://forum.keycloak.org/t/cookie-not-found-ha-gcp-load-balancer/14967)

<div class="topic-metadata">

**Author:** [@datacoderid](https://forum.keycloak.org/u/datacoderid)\
**Replies:** 3\
**Last updated:** [March 26, 2023, 9:28am UTC](https://forum.keycloak.org/t/cookie-not-found-ha-gcp-load-balancer/14967 "2023-03-26T09:28:20Z")

</div>

Hi All, I have architecture as below: GCP Load Balancer (https://ssolb.xxx.com) Keycloak Quarkus 17.0 installed in VM without Docker (https://sso1.xxx.com & https://sso2.xxx.com) Frontend Apps (Next.Js) Keycloak Conf…

---

## [Three server clustered config](https://forum.keycloak.org/t/three-server-clustered-config/18745)

<div class="topic-metadata">

**Author:** [@mapkyca](https://forum.keycloak.org/u/mapkyca)\
**Replies:** 7\
**Last updated:** [March 9, 2023, 3:16pm UTC](https://forum.keycloak.org/t/three-server-clustered-config/18745 "2023-03-09T15:16:34Z")

</div>

Dear folks, We already have a working standalone.xml version with a separate backend database on another server. I have three servers that I want to spin up a clustered Keycloak environment. The documentation is a litt…

---

## [Returns login page continuously on login.](https://forum.keycloak.org/t/returns-login-page-continuously-on-login/20356)

<div class="topic-metadata">

**Author:** [@tanloc](https://forum.keycloak.org/u/tanloc)\
**Replies:** 0\
**Last updated:** [February 21, 2023, 7:19am UTC](https://forum.keycloak.org/t/returns-login-page-continuously-on-login/20356 "2023-02-21T07:19:43Z")

</div>

I have created a cluster k8s and deployed keyloak server with replication of 2, keyloak connects to postgres to store user, client… And all is well until I login, it returns login page continuously even though the code …

---

## [Refresh IDP tokens in cluster mode](https://forum.keycloak.org/t/refresh-idp-tokens-in-cluster-mode/20338)

<div class="topic-metadata">

**Author:** [@hozaangelica](https://forum.keycloak.org/u/hozaangelica)\
**Replies:** 0\
**Last updated:** [February 20, 2023, 1:40pm UTC](https://forum.keycloak.org/t/refresh-idp-tokens-in-cluster-mode/20338 "2023-02-20T13:40:07Z")

</div>

Hello, I have a Keycloak cluster with 2 nodes (A and B) and an Identity Provider set up and the following scenario: request token\_exchange between Keycloak and IDP from node A =\> everything works as expected and the n…

---

## [HA setup in kubernetes](https://forum.keycloak.org/t/ha-setup-in-kubernetes/15874)

<div class="topic-metadata">

**Author:** [@flamingo\_as\_service](https://forum.keycloak.org/u/flamingo_as_service)\
**Replies:** 13\
**Last updated:** [January 27, 2023, 11:35pm UTC](https://forum.keycloak.org/t/ha-setup-in-kubernetes/15874 "2023-01-27T23:35:05Z")

</div>

I’m trying to get keycloak to work in a HA mode with multiple replicas however I’m struggling to do so. I would like to use jgroups.dns.query for this. Mind you, I’m using a docker image published by bitnami and istio as…

---

## [KEYCLOAK 20 clustering](https://forum.keycloak.org/t/keycloak-20-clustering/19488)

<div class="topic-metadata">

**Author:** [@hakimnorizman](https://forum.keycloak.org/u/hakimnorizman)\
**Replies:** 0\
**Last updated:** [January 10, 2023, 8:13am UTC](https://forum.keycloak.org/t/keycloak-20-clustering/19488 "2023-01-10T08:13:29Z")

</div>

Hi, I have been using keycloak 19.0.2-legacy which is a WildFly distribution to create a cluster using docker and docker compose. recently after I shutdown the keycloak for addition maintenance, I tried pulling the same …

---

## [Cache configuration file throwing error no matter what is inside](https://forum.keycloak.org/t/cache-configuration-file-throwing-error-no-matter-what-is-inside/18387)

<div class="topic-metadata">

**Author:** [@imre](https://forum.keycloak.org/u/imre)\
**Replies:** 0\
**Last updated:** [November 11, 2022, 8:27am UTC](https://forum.keycloak.org/t/cache-configuration-file-throwing-error-no-matter-what-is-inside/18387 "2022-11-11T08:27:12Z")

</div>

Hi, When loading cache config even using default file always getting: \[error\]: Build step org.keycloak.quarkus.deployment.CacheBuildSteps#configureInfinispan threw an exception: java.lang.IllegalArgumentException: Coul…

---

## [Keycloak bare metal quarkus and cluster ha - distributed cache not working](https://forum.keycloak.org/t/keycloak-bare-metal-quarkus-and-cluster-ha-distributed-cache-not-working/18145)

<div class="topic-metadata">

**Author:** [@xpoveda](https://forum.keycloak.org/u/xpoveda)\
**Replies:** 5\
**Last updated:** [October 31, 2022, 8:55am UTC](https://forum.keycloak.org/t/keycloak-bare-metal-quarkus-and-cluster-ha-distributed-cache-not-working/18145 "2022-10-31T08:55:33Z")

</div>

Hi everybody, I have been working for a few days on the installation of a keycloak cluster in azure on redhat machines for later installation on corporate bare metal redhat machines. The installation on a single server…

---

## [Standalone-HA Clustering Configuration Fails!](https://forum.keycloak.org/t/standalone-ha-clustering-configuration-fails/816)

<div class="topic-metadata">

**Author:** [@sanketd.kc](https://forum.keycloak.org/u/sanketd.kc)\
**Replies:** 5\
**Last updated:** [October 26, 2022, 8:18pm UTC](https://forum.keycloak.org/t/standalone-ha-clustering-configuration-fails/816 "2022-10-26T20:18:24Z")

</div>

I am trying to cluster two instances of Keycloak (v8.0.1) over two VM’s in Digital Ocean. I am using Private IP addresses to bind my KC instance and enable clustering. Using Ubuntu 18.04 and OpenJDK 8. My setup looks as…

[Next page](https://forum.keycloak.org/tag/clustering/66.md?match_all_tags=true&page=1&tags%5B%5D=clustering)
