# Keycloak 21.0.1 Clustering

**URL:** <https://forum.keycloak.org/t/keycloak-21-0-1-clustering/21921>\
**Category:** Configuring the server\
**Tags:** clustering\
**Created:** [May 5, 2023, 4:52am UTC](https://forum.keycloak.org/t/keycloak-21-0-1-clustering/21921 "2023-05-05T04:52:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreejith.nair](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@sreejith.nair](https://forum.keycloak.org/u/sreejith.nair)\
**Post date:** [May 5, 2023, 4:52am UTC](https://forum.keycloak.org/t/keycloak-21-0-1-clustering/21921/1 "2023-05-05T04:52:05Z")

</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 any docs for clustering because we couldn’t find any docs from keycloak 21.0.1 latest documentation or how to do clustering on keycloak 21.0.1.

---

<div class="post-metadata">

**Author:** ![weltonrodrigo](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/weltonrodrigo/32/3104_2.png) [@weltonrodrigo](https://forum.keycloak.org/u/weltonrodrigo)\
**Post date:** [May 5, 2023, 2:47pm UTC](https://forum.keycloak.org/t/keycloak-21-0-1-clustering/21921/2 "2023-05-05T14:47:33Z")

</div>

The clustering doc is here: [Configuring distributed caches - Keycloak](https://www.keycloak.org/server/caching)

Search this forum for cluster or “keycloak HA” for more information.

Basically, if the two virtual machines are in the same subnet, they will find each other and automagically form a cluster. You’ll also need an external database so that the cluster will have the same data.

---

<div class="post-metadata">

**Author:** ![sreejith.nair](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@sreejith.nair](https://forum.keycloak.org/u/sreejith.nair)\
**Post date:** [May 9, 2023, 4:52pm UTC](https://forum.keycloak.org/t/keycloak-21-0-1-clustering/21921/3 "2023-05-09T16:52:54Z")

</div>

Thank you for the response.  
I am using a common postgres database for both the instances.
