---
title: "High availability for everyone with multi-site Red Hat build of Keycloak on Red Hat OpenShift"
description: "Identity and access management failures can lock healthy application workloads, yet high-availability setups for services like Keycloak have historically been operationally complex and tied to heavy cloud architectures. Starting with Red Hat build of Keycloak 26.4, the stateless feature shifts away from cross-site Infinispan cache replication by externalizing session data into a shared synchronous database, keeping local caches isolated per site, and presenting a unified OIDC issuer behind an external load balancer. An active health-check endpoint (/lb-check) enables external load balancers to detect site degradation and route traffic away from a failed site. A dual-site proof of concept using Red Hat OpenShift Local, PostgreSQL synchronous replication, and HAProxy demonstrated that scaling a primary site to zero replicas caused no user interruptions, as token refreshes and OIDC sessions remained valid. Upstream documentation improvements were contributed to clarify hostname alignment, port specification, and router stickiness configuration."
---

# High availability for everyone with multi-site Red Hat build of Keycloak on Red Hat OpenShift

[Red Hat](https://yomu.fyi/company/red-hat) · Jerczey Godoy · Oct 21, 2026

**Type:** Problem & solution

## Summary

Identity and access management failures can lock healthy application workloads, yet high-availability setups for services like Keycloak have historically been operationally complex and tied to heavy cloud architectures. Starting with Red Hat build of Keycloak 26.4, the stateless feature shifts away from cross-site Infinispan cache replication by externalizing session data into a shared synchronous database, keeping local caches isolated per site, and presenting a unified OIDC issuer behind an external load balancer. An active health-check endpoint (/lb-check) enables external load balancers to detect site degradation and route traffic away from a failed site. A dual-site proof of concept using Red Hat OpenShift Local, PostgreSQL synchronous replication, and HAProxy demonstrated that scaling a primary site to zero replicas caused no user interruptions, as token refreshes and OIDC sessions remained valid. Upstream documentation improvements were contributed to clarify hostname alignment, port specification, and router stickiness configuration.

## Context

Enterprise IT teams migrating from legacy Red Hat SSO to the newer Keycloak on on-premises private data centers needed multi-site HA that worked with their own OpenShift clusters, enterprise load balancers, and on-premises databases, not just heavy cloud architectures.

## Approach / What changed

The post introduces a stateless HA architecture for Red Hat build of Keycloak that replaces cross-site in-memory Infinispan cache replication with externalized session state stored in a shared synchronous database, isolated local caches, a unified OIDC issuer behind a load balancer, and an active health-check endpoint (/lb-check) for site-level traffic routing.

## Takeaways

- Stateless HA removes the need for cross-site Infinispan cache replication by persisting session state in a shared synchronous database, eliminating WAN latency constraints.
- An active health-check endpoint (/lb-check) allows external load balancers to detect site failure and route traffic away from a degraded site without requiring session stickiness.
- Both authorization code flow with PKCE and standard V2 token exchange (RFC 8693) remain fully operational during active cross-site outages when using stateless HA.

## FAQ

### How does stateless HA avoid WAN latency issues?

Each site uses isolated, local Infinispan caches instead of replicating session data across sites. Session state is persisted in a shared synchronous database, so failover is transparent to OIDC clients.

### How does the load balancer detect site failure?

An active health check endpoint (/lb-check) lets external load balancers query each site's status. When a site is degraded, the load balancer routes traffic away from it, enabling automatic failover without session stickiness.

### Do OIDC flows survive cross-site failover?

Yes, the post validates that both authorization code flow with PKCE and standard V2 token exchange (RFC 8693) remain fully operational during active site outages, with zero user interruptions.

**Tags:** [High Availability](https://yomu.fyi/topic/high-availability), [IAM](https://yomu.fyi/topic/iam), [Keycloak](https://yomu.fyi/topic/keycloak), [Red Hat OpenShift](https://yomu.fyi/topic/red-hat-openshift)

- Source: [Red Hat](https://developers.redhat.com/articles/2026/10/21/high-availability-for-everyone-with-multi-site-red-hat-build-of-keycloak-on-red-hat-openshift)
- Source URL: https://developers.redhat.com/articles/2026/10/21/high-availability-for-everyone-with-multi-site-red-hat-build-of-keycloak-on-red-hat-openshift
- Ingested by Yomu: 2026-10-21T15:00:18.645Z

[Read original post](https://developers.redhat.com/articles/2026/10/21/high-availability-for-everyone-with-multi-site-red-hat-build-of-keycloak-on-red-hat-openshift)
