Why Keycloak high availability starts with the database and the failure domain
Sign-in is a shared dependency. When the identity provider stops answering, every application that delegates authentication to it stops too, which is why high availability for Keycloak is a design decision about where failure domains sit and how the database behind it is replicated. Adding a second Keycloak node is the easy part. The harder questions are whether the two nodes can fail independently, whether the database they share can survive the loss of one zone, and whether a failover leaves users signed in or forces them back through the login flow. Teams usually need to design for high availability when an outage of the sign-in service becomes a business incident rather than an inconvenience. The triggers tend to be a stated uptime target for the applications behind Keycloak, an infrastructure footprint that already spans multiple availability zones or data centers, or a regulated expectation that critical authentication services remain available during single-site failures. Before choosing an architecture, confirm with your risk owners which of these apply, which applications depend on sign-in directly, and what a degraded state looks like for each of them. Those answers set the failure domains you need to cover. Keycloak documents three high availability architectures at a high level. The first is a single cluster, optionally spread across availability zones, where nodes share one database and communicate through the built-in Infinispan caches. The second is multi-cluster deployment, version 2, which avoids an external Infinispan cluster and is the design the project points new deployments toward. The third is multi-cluster version 1, which uses a separate Infinispan cluster per site and is deprecated. The Keycloak high availability overview documents the requirements for each. For both supported designs, the database must be synchronously replicated, so the database topology is the first constraint you should check against your cloud or data center options. A second node does not make a system highly available on its own. Keycloak keeps some state in memory and in distributed caches, including sessions and tokens that are not yet persisted, so the cluster has to replicate or share that state correctly when a node disappears. Session handling also depends on how the load balancer routes requests and how sticky sessions are configured. Schema migration adds another risk: by default Keycloak migrates its database schema at startup, which means a rolling restart can trigger migration on a node that is serving traffic. Teams that run large deployments often move schema changes to a manual, controlled step. Finally, high availability is only proven by failover testing. Plan tests that stop a node under load, remove an availability zone, and fail over the database, then measure whether existing sessions survive and how long new sign-ins take to recover. Record the results against the targets your risk owners approved. The implementation plan should include these tests as acceptance criteria, with named owners for the database, network and identity teams.
Components that make up a Keycloak HA deployment
A Keycloak high availability design is a set of cooperating parts: several server nodes, a clustering layer, a shared database, and the traffic and health paths in front of them. Each part has a specific job, and a weakness in any one of them limits the availability of the whole sign-in service.
Keycloak server nodes
Two or more Keycloak server instances run the same realm configuration and serve sign-in, token and admin traffic. Each node needs identical configuration, TLS settings and a hostname scheme that the load balancer can reach. Check that every node starts with the same database and clustering options, because a node with drifted settings can pass health checks while handling logins differently.
Infinispan clustering caches
Keycloak uses Infinispan, a distributed in-memory cache, to share sessions, login state and other transient data between nodes so a user is not forced to sign in again when a node fails. Your team must confirm how the caches are replicated or owned across nodes and sites for your chosen architecture. Test node loss under load to confirm that sessions survive as expected.
Synchronously replicated database
All Keycloak nodes read and write one logical database for realms, users, clients and credentials, and both supported HA designs require synchronous replication. Supported production options include PostgreSQL 14 to 18 and Amazon Aurora PostgreSQL, among others listed in the database guide. Confirm the replication mode, failover time and connection pool sizing with your database team before go-live.
Load balancer or reverse proxy
A load balancer or reverse proxy distributes sign-in requests across nodes, terminates TLS and removes unhealthy nodes from rotation. Keycloak's production guidance also calls for path restrictions so the admin console and Administration REST API are not exposed on the public frontend hostname. Confirm session affinity behavior, forwarded header handling and health check paths with your network team.
Management interface for health and metrics
Keycloak serves health and Prometheus-format metrics at /metrics on a separate management interface when started with metrics enabled. Orchestrators and monitoring systems use this interface to decide whether a node is ready and to alert on login failures, latency and cache health. Keep this interface off public networks, and confirm that your scrape and probe paths reach it without exposing it to users.
Keycloak Operator for Kubernetes
On Kubernetes, the Keycloak Operator manages Keycloak instances, realm imports and client resources as custom resources, and it is installed through Operator Lifecycle Manager or other supported methods. Set operator updates to manual approval so that a new operator version does not upgrade your production instances without a test window. Confirm which database connection and secret management patterns your cluster team will support.
Choosing between a single cluster across zones and multi-cluster deployments
This table compares the three high availability architectures Keycloak documents, along with the database decision that applies to both supported designs. Read each row against your zone and site layout, the latency between locations and how many clusters your team can run and upgrade. The main takeaway is that a single cluster across zones is the usual starting point, and the deprecated v1 design should not be chosen for new deployments.
| Option or decision | When it fits | Operational cost and risk |
|---|---|---|
| Single cluster across availability zones | Several zones within one region where inter-zone latency is low and one team operates Keycloak. | One cluster to upgrade and monitor. Database and cache traffic cross zones, so test zone failure before go-live. |
| Multi-cluster deployment (v2) without external Infinispan | Two or more sites that need separate Keycloak clusters and the documented multi-cluster design. | Each site runs its own cluster. Inter-site latency adds to database write time. Confirm the design details in the Keycloak documentation. |
| Multi-cluster v1 (deprecated) | Existing deployments already running it. Not recommended for new designs. | A separate Infinispan cluster per site adds a second stateful tier to size, upgrade and monitor, on a deprecated feature. |
| Database replication | Required by both supported designs. Plan synchronous replication that your chosen production database supports. | Synchronous replication adds latency to every write. Confirm supported database versions and topology with the Keycloak database guide. |
| Clusters to upgrade | Single cluster: one upgrade path. Multi-cluster designs: one upgrade path per site. | Plan maintenance windows and rollout order for each site. Confirm whether automatic or manual schema migration suits your size. |
| Session and cache behavior | Determines how sessions survive node or site failure under each design. | Confirm how sessions and caches replicate in each design before sizing. Verify behavior during failover tests. |
| Upgrade from deprecated multi-site feature | Environments currently running the deprecated multi-site feature. | Keycloak 26.8 upgrade notes recommend moving to the stateless feature. Confirm which design fits your topology in the Keycloak documentation. |
How to build Keycloak high availability step by step
This sequence takes a Keycloak deployment from agreed availability targets to a clustered setup tested against failure. Each step builds on the one before it and ends with a check your team can record. The result is a node, database, proxy and monitoring layout that your team can operate, document and test before users depend on it.
Confirm availability targets and failure domains
The platform team and business owners agree on the availability target for sign-in, the recovery expectations for a failed node, zone or site, and which components sit in each failure domain. Decide whether one cluster spread across availability zones meets the target or whether a multi-cluster design is needed, since the supported designs have different requirements. Ask your architects or the vendor to confirm the current documented constraints for your chosen design. Done when the design record names every failure domain and the owner of each.
Provision a synchronously replicated database
Your database team provisions a database from Keycloak's supported list, such as PostgreSQL 14 to 18, Amazon Aurora PostgreSQL or another listed engine, and configures synchronous replication across the failure domains your design requires. Both supported high availability designs need this. Confirm the replication mode, failover behavior and connection endpoint with the database vendor's documentation, and record the data loss the business will accept. Done when a controlled database failover completes and the endpoint resolves from every Keycloak node subnet.
Set database connection and migration mode
Configure every node with the same database connection settings, with credentials pulled from your secret store, and choose a schema migration mode. Keycloak migrates the schema automatically at startup by default. For large deployments, the upgrading guide suggests manual migration, where your team generates and applies the SQL before nodes start. Pick one mode, document it in the runbook, and make sure only one migration path runs during any upgrade. Done when all nodes connect to the same database and the schema matches the release you installed.
Start nodes with clustering for the chosen design
Deploy at least two Keycloak nodes with identical configuration and clustering enabled for the architecture chosen in the first step. Place nodes in separate availability zones only if the chosen design supports it and the latency between nodes and the database stays within the limits in the vendor's high availability documentation. Confirm cluster membership and cache settings against that guide before starting nodes. Done when the logs show every node joining the cluster and a sign-in issued by one node is accepted by another.
Place load balancer and reverse proxy with TLS
Put a load balancer in front of the nodes and a reverse proxy that terminates TLS on every public path, using certificates from your own certificate authority. Forward only the paths that public users and applications need, and block everything else at the proxy, including administrative paths. Enable sticky sessions only if your session design requires them, and test that the setting matches your session persistence plan. Done when a scan of the public hostname shows TLS on every listener and an unlisted path is denied at the proxy.
Separate admin hostname from public URLs
Expose the admin console and Administration REST API on a hostname or context path that differs from the public frontend URLs, as the production configuration guide recommends. Restrict the admin hostname to management networks such as a VPN or bastion host, and set the frontend URL explicitly so tokens carry the correct public issuer. Done when a request to the admin console from a public network is refused and each realm's discovery document lists the public issuer URL.
Enable metrics and health checks
Start nodes with metrics enabled, which exposes Prometheus-format metrics at the /metrics path on the management interface, and keep that interface off public routes. Configure the load balancer or orchestrator to use the health endpoints when deciding whether a node stays in rotation, and connect the metrics to your monitoring system. Agree the alert signals with your operations team, such as login failures, latency and cache health. Done when Prometheus scrapes every node, a stopped node is marked unhealthy, and a test alert fires.
Run failover tests before go-live
Test each failure the design is meant to survive: stopping one node, losing an availability zone, failing over the database, and restarting the load balancer. Measure how quickly sign-ins and existing sessions recover against the availability target from the first step, and record which users see errors during each test. Repeat the tests after any change to nodes, database or proxy settings. Done when each result is recorded against the target and the team signs off the failover and rollback runbook before production traffic moves.
What happens to user sessions when a Keycloak node fails
Losing a Keycloak node does not automatically mean every signed-in user keeps their session. Whether users continue without interruption or must sign in again depends on where user sessions and login state are held in your chosen architecture, and that is a design decision to make before go-live. Keycloak clusters share session and login state across nodes through Infinispan caches, but how far that state is replicated, and what a surviving node can recover, depends on the architecture and version. Plan for the case where some users are asked to authenticate again, and treat transparent continuation as something to prove in testing rather than assume.
The three documented high availability designs handle session state differently, so the choice matters for this question. In a single cluster spread across availability zones, sessions are held in the cluster's distributed caches, and the surviving nodes depend on cache ownership settings to find them. The multi-cluster v2 design does not use an external Infinispan cluster, so confirm how session state moves between sites. The deprecated multi-cluster v1 design used a separate Infinispan cluster per site, which means a site-level failure affects a different set of state. The Keycloak 26.8 upgrade notes recommend moving from the deprecated multi-site feature to the stateless feature, so confirm what that change means for sessions before you commit to a design. In every case, both supported designs still require a synchronously replicated database, and you should confirm with the high availability overview which session data lives in the database and which lives in caches.
Users will experience a node loss in one of several ways, and each depends on a different setting. A user who is midway through a sign-in can lose that attempt and must start again. A user with an existing Keycloak single sign-on session may continue silently if the session survives the failure. Access tokens remain valid until they expire, so the application may keep working briefly, but a token refresh that fails forces a new sign-in. The SSO session idle and maximum lifetimes, along with token lifetimes, decide how long these states last. Write these expectations down per realm and per client, and confirm the values with the security team, since shorter lifetimes change both user experience and risk.
The load balancer shapes how often users are affected. Sticky sessions send a user back to the same node, which keeps cache lookups local during normal operation but means that user is directly affected when that node fails. Without stickiness, requests spread across nodes and a surviving node must find the state it needs, which is the case your cache design must support. Set balancer idle timeouts so they do not close long-lived connections before Keycloak does, and configure health checks that remove a failed node quickly. Agree with the application teams how their clients handle an expired session, a 401 response or a redirect back to sign-in, and confirm that no redirect loop appears after a failover.
Test the behavior instead of relying on the documentation alone. In a staging environment that mirrors production, stop one node while a test user is in each state: during sign-in, with an idle SSO session, during a token refresh and during a consent step. Record for each flow whether the user continued, was asked to sign in again or saw an error, and how long recovery took. Repeat the test after each Keycloak upgrade, because session behavior can change between versions. Compare the results with your availability target and with what the application teams can tolerate. Document the result as the expected behavior for users, and do not describe it to stakeholders as zero impact.
Keycloak high availability on VMs, Kubernetes and air-gapped networks
On virtual machines or plain container hosts, Keycloak runs as several identical nodes behind a load balancer, all connected to one synchronously replicated database. The nodes share cache and session state through Keycloak's clustering, and the load balancer spreads sign-in traffic across them. The main design choice is topology. Keycloak documents a single cluster optionally spread across availability zones and a multi-cluster design. The multi-cluster v1 design, which used a separate Infinispan cluster per site, is deprecated, and the 26.8 upgrade notes recommend moving from the deprecated multi-site feature to the stateless feature.
Decisions to make:
- Topology: Choose a single cluster across zones when inter-zone latency to the database still meets your sign-in targets. Choose a multi-cluster design only when your availability targets require separate sites, and confirm the design for your version with the vendor.
- Load balancer: Configure health checks against Keycloak's health endpoints. Decide whether sessions stick to a node, and test failover with and without stickiness.
- Database: Confirm that your database product and version are on the supported list and that replication is synchronous. Test database failover on its own, because Keycloak cannot mask a database outage.
- Zone placement: Spread nodes across zones so that losing one zone still leaves enough nodes to carry peak sign-in load.
- Management exposure: Serve the admin console and administration API on a separate hostname, and expose metrics on the management interface only to the monitoring network.
Before go-live, confirm with the vendor which high availability architecture applies to your version, the supported database versions, and any load balancer settings the vendor requires.
On Kubernetes, the Keycloak Operator is the recommended installation path, and the Operator Lifecycle Manager (OLM) is the recommended way to install it. The operator manages Keycloak nodes through a custom resource, so the team describes replica count, database settings and hostnames declaratively. High availability then depends on how the cluster places pods and how pods reach a database that usually runs outside the cluster.
Decisions to make:
- Operator update approval: Set the OLM subscription to manual approval. The operator documentation strongly recommends this to avoid unintended automatic upgrades, so each operator update should pass through a test cluster first.
- Database connectivity from pods: Define how pods reach the database through DNS names, network policies, TLS certificates and credentials stored in Kubernetes secrets or an external secret manager. Allow egress only to the database endpoints.
- Zone placement: Use topology spread constraints across zones, and confirm that node pools exist in the same zones as the database replicas.
- Schema migration: Decide whether automatic migration at startup is acceptable, or whether the database team applies the migration SQL manually, which the upgrading guide suggests for large deployments.
- Realm and client resources: Keep realm imports and client resources in version control, and define who approves changes to them.
Confirm with the vendor which operator version pairs with your Keycloak version and which Kubernetes versions it supports. Confirm with your platform team the OLM catalog source, the node zones available and the network path to the database.
In an air-gapped network, the database, load balancer and cache topology must all sit inside the isolated environment, and nothing in the design can depend on a public service at runtime or during installation. The team designs and tests the whole stack inside the enclave, including database replication and failover. Every artifact, from images to operator bundles, arrives through a controlled transfer process.
Decisions to make:
- Topology inside the enclave: Document which sites or zones exist inside the isolated network and whether a second site is possible. Test load balancer failover and database failover in that environment.
- Image provenance: Mirror container images into an internal registry through the approved transfer process. Verify each artifact against the checksums or signatures the vendor publishes before import, and record which digest runs in each environment.
- Operator catalog: On Kubernetes, OLM needs a mirrored catalog. Confirm how catalogs are mirrored and how update approval works when the cluster cannot reach public catalogs.
- External dependencies: Disable features that call external services, such as social login providers, and point email to an internal SMTP relay. The 26.8 upgrade notes enforce StartTLS for SMTP without plaintext fallback, so the relay must support it.
- Patch cadence: Security releases must cross the air gap, so plan the transfer, testing and approval steps before a release is needed.
Confirm with the vendor which artifacts it publishes for offline installation, how signatures are verified, and which features in your version need internet access.
What drives the cost and effort of Keycloak high availability
This table lists the factors that change the work of a Keycloak high availability design and the ways to keep each one manageable. Read each row as a question to answer before requesting a quote. The main takeaway is that node count, cluster count and environment count multiply testing and runbook effort, so starting with one well-tested cluster is usually the simplest path.
| Driver | Why it changes cost or effort | How to keep it down |
|---|---|---|
| Number of Keycloak nodes and zones | Each added node and availability zone adds configuration, health checks, load balancer targets and failover scenarios to test. | Start with the node count your availability target needs, and spread a single cluster across zones only where the target requires it. |
| Number of clusters in multi-cluster designs | Multi-cluster deployments add cross-site replication, split-brain handling and a second set of operations, monitoring and upgrade steps. | Stay on a single cluster until a documented requirement forces a second site, then add clusters one at a time. |
| Database placement and replication | Keycloak's supported HA designs need a synchronously replicated database, so replication topology, failover behavior and backup restore all need design and testing. | Use the database platform your team already operates, and confirm the replication mode and failover method with the database vendor before design starts. |
| Network latency between sites | Higher latency between zones or sites affects database write timing, cache synchronization and session behavior, which adds tuning and measurement work. | Measure latency between sites during design, and keep synchronous database links within the range your database vendor documents. |
| Load balancer and reverse proxy complexity | Health check endpoints, sticky session settings, TLS termination and path restrictions for the admin console must all match across nodes and hostnames. | Use one reverse proxy pattern for every environment, and keep the admin console on a separate hostname or context path from public frontend URLs. |
| Number of realms and clients | More realms and clients increase cache size, the volume of configuration to migrate, and the number of login flows to verify after a failover. | Test a representative set of realms and clients under load, and limit the failover test matrix to the flows that business users depend on. |
| Number of environments (dev, staging, production) | Each environment needs its own infrastructure, database and test runs, so drift between environments creates rework. | Build all environments from the same automation and reuse one tested runbook, changing only sizing and hostnames. |
| Compliance evidence needs | Assessors may ask for failover test records, change approvals, backup restore results and configuration baselines, which takes time to collect and keep current. | Agree the evidence list before build, and export test results and configuration from the same pipeline that deploys the system. Assessment outcomes come from independent auditors. |
| Internal team time for testing and runbooks | Failover tests, runbook reviews and operator upgrade approvals depend on staff from identity, database, network and application teams. | Script failover tests so they can be repeated after each upgrade, and confirm early which internal roles must approve and run each test. |
Securing the HA layer: TLS, admin separation and secrets
A highly available Keycloak cluster multiplies the places where traffic, credentials and administrative control can be exposed. The cards below cover the controls Keycloak's production guidance expects around the load balancer, the nodes, the database and the management plane, and what to verify before go-live.
TLS on every hop
Keycloak's production guidance calls for TLS on all communication, which includes client traffic to the load balancer, the load balancer to each node, and the nodes to the database. Plan certificates and trust stores for each hop, and check that no internal leg silently falls back to plaintext after a failover or a load balancer change.
Separate admin and public hostnames
Expose the admin console and the Administration REST API on a different hostname or context path from the public frontend URLs used for sign-in. This keeps administrative endpoints off the paths that end users and applications reach. Confirm that the frontend URL and the admin URL are configured separately on every node so that the cluster does not advertise the wrong one.
Reverse proxy path restrictions
The reverse proxy in front of the cluster should allow only the paths that public clients need and block administrative and management paths from the internet-facing listener. Test the rules against each frontend path, the admin paths and the metrics path, since a permissive rule in one proxy tier can undo the separation built in Keycloak itself.
Database and cluster secrets outside images
Database credentials, TLS keys and any cluster-level secrets should come from a secret store or orchestrator secret objects at runtime, never from container images, environment values in manifests or files committed to source control. Ask who can read those secrets, how rotation is performed without a full cluster restart, and whether secret access is logged.
Metrics and management endpoints on monitoring networks
Prometheus-format metrics are served at the metrics path on the management interface when metrics are enabled. Restrict that interface and the health endpoints to the monitoring and orchestration networks, not the public listener. Verify that a scrape from outside those networks fails, and that the monitoring network itself is protected.
Control over failover and load balancer changes
Changes to load balancer targets, health checks and database failover settings can take a cluster out of service or route traffic to a stale primary. Limit who can change these settings, require a change record and peer review, and keep a tested rollback. Confirm which roles hold these permissions in the cloud account, the database platform and the load balancer console.
Testing Keycloak failover against your availability targets
A high availability design is only proven when it is tested against targets the business has agreed in writing. Before any test runs, record the sign-in availability target, the acceptable recovery time after each failure type, and the sessions users may lose during an incident. These are business decisions, so confirm them with application owners and the risk function, not only with the platform team. Without written targets, the test result has nothing to be measured against, and the team ends up debating after the fact whether an interruption was acceptable.
The plan should cover five cases. First, node loss: stop one Keycloak node under steady sign-in load. Second, zone loss: if the design spans availability zones, take down every node in one zone. Third, database primary failover: trigger a failover on the synchronously replicated database and confirm that Keycloak reconnects without a manual restart. Fourth, load balancer health check failure: make one node fail its health check and confirm that traffic drains from it cleanly. Fifth, a rolling restart during a minor upgrade, one node at a time, with the new version. For each case, write the fault injection method, the expected behavior, the rollback step and the owner who runs it.
For each run, capture three kinds of evidence. The first is login success rate, taken from the load generator and cross-checked against login failure counters on the Prometheus-format /metrics endpoint, which is served on the management interface only when metrics are enabled. The second is time to recover, measured from fault injection until the success rate returns to baseline, using request latency histograms and cache health signals where your configuration exposes them. The third is session survival: seed test users with active sessions and refresh tokens before each fault, then record which users must sign in again. In Keycloak 26.8, login failures are persisted to the database by default, so confirm the extra write load during the test window.
The failure-safe check is a separate test and it must pass. When the database or the cluster is unavailable, Keycloak must not allow any sign-in to succeed by skipping checks. Make the database unreachable, then attempt sign-ins with valid credentials, wrong passwords, disabled users, expired accounts and flows that require a second factor. Every attempt should fail closed, with no tokens issued and no session created. Confirm that the load balancer does not route traffic to a node that cannot reach the database. Keep the output of this check as evidence, because an auditor or a security reviewer will ask for it.
Run these tests in a production-like environment with the same Keycloak version, the same database engine and replication topology, the same reverse proxy, TLS settings and load balancer, and a comparable node count. Results from a smaller lab rarely transfer to production. Repeat the full set after every Keycloak upgrade, including minor releases, and after any change to the database, network path or load balancer configuration. When you request a quote, ask for the test cases, the success criteria tied to your agreed targets, and a written report of results and open findings as deliverables.
Keycloak high availability questions buyers ask before hiring help
How much does a Keycloak high availability design cost?
The cost depends on how many components your design needs and who builds and runs them, so no single figure applies. One-time costs include the design decisions, the database and load balancer build, the cluster deployment in each environment, failover testing and documentation. Recurring costs include the database and compute running in each environment, extra capacity for a second zone or site, monitoring, patching, and the internal time to operate and test failover. Costs rise with the number of environments, whether you run one cluster across availability zones or separate clusters per site, the database licensing and replication model you choose, and how many realms and clients must stay available. Ask any partner for a quote that lists each component, states what is one-time and what recurs, and names the environments it covers.
How long does Keycloak high availability take to implement?
Duration is driven by scope and by the number of environments, not by Keycloak itself. The main variables are the architecture you select, whether the database replication is already in place or must be built, how mature your load balancer and network automation are, and how many environments (development, test, staging, production) must match. Failover testing usually takes longer than the initial build because each failure scenario needs a repeatable test and a documented result. Ask for a written timeline with milestones for design sign-off, each environment, and failover test completion, and confirm which of your teams must be available at each milestone.
Can our own team build Keycloak high availability without outside help?
Yes, if your team already has the skills and the time to test. The build needs working knowledge of synchronously replicated relational databases, load balancer health checks and session routing, TLS termination, and Keycloak clustering settings. The harder part is testing: your team must simulate node loss, zone loss and database failover, measure how sign-ins and existing sessions behave, and repeat the tests after each Keycloak upgrade. If your database or network staff are already running highly available services, the gap is usually Keycloak-specific testing and runbooks. If not, outside help is most useful for the design review and the first failover test.
What do we need to provide during a Keycloak high availability project?
The project needs named owners from four areas. The database owner provides the replicated database platform, backup policy and credentials handling. The network owner provides load balancer capacity, DNS, firewall rules between nodes and the reverse proxy path rules. The availability zone or site owner confirms which zones or sites are used, their capacity and their power and network independence. The identity owner decides the realm structure, client list, session and token lifetimes and which sign-in flows must survive a failover. Each owner should also approve the failover test plan, since tests can interrupt production sign-ins if run carelessly.
Does Red Hat build of Keycloak change the high availability design?
The core architecture stays the same: Keycloak documents a single cluster optionally spread across availability zones, multi-cluster deployments without external Infinispan, and a deprecated multi-cluster design that used a separate Infinispan cluster per site, and both supported designs require a synchronously replicated database. Red Hat build of Keycloak is Red Hat's supported distribution based on the open source project and replaces Red Hat Single Sign-On. What changes is support scope, the subscription and the release cadence you must follow. Confirm with Red Hat which configurations and database versions your subscription covers before choosing a design, and confirm which version your environments will run.
What should we ask for in a Keycloak high availability quote?
Ask for a written scope that lists the architecture chosen, the environments covered, and the components built, including the database, load balancer, cluster deployment, monitoring and backup. Require the quote to separate one-time work from recurring items and to name who pays for each cloud, database and licensing line. Ask which failover scenarios will be tested, how results are documented and whether the tests will be repeated after upgrades. Confirm the assumptions about your teams' availability, the change control process for production, and what happens if a dependency such as the database platform is not ready when work starts. Deliverables and timelines should be agreed in writing before work begins.
Which Keycloak high availability decisions are hardest to change later?
The decisions that are costly to reverse are the high availability architecture, the database platform and replication model, and the hostnames used for public and admin endpoints. Changing the architecture after go-live means rebuilding clusters and retesting failover. Choosing a database that does not match the supported list, or one whose synchronous replication you cannot operate, forces a migration later. Set these decisions during the design review, and record the reasons, so future upgrades and audits can trace them. Keycloak upgrades also change the database schema, so confirm early whether your team will run automatic or manual migration.
How DeployOpen scopes, builds and hands over Keycloak high availability
DeployOpen plans, implements, hardens, documents and supports self-hosted Keycloak inside your own infrastructure, including the high availability design you choose. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.
How we scope
- Confirm which of the three documented high availability architectures fits your sites, failure domains and availability targets
- Record the database engine, which must support synchronous replication for the chosen design, and where it runs
- Agree load balancer, reverse proxy and hostname layout, including separate admin and public endpoints
- Define which realms, clients and environments are in the written scope and which are excluded
How we build
- Deploy the Keycloak nodes and database replication in your accounts, data centers or air-gapped network
- Configure the load balancer, session handling and health checks against the agreed failover behavior
- Enable metrics on the management interface and wire them to your existing monitoring stack
- Run failover tests that stop nodes and the primary database, then record measured recovery against your targets
How we hand over
- Deliver architecture diagrams, configuration records and the failover test results for your review
- Document the operator or manual steps for database schema migration and Keycloak version upgrades
- Walk your platform and identity teams through runbooks for node replacement, database failover and rollback
- Transfer administrative access and confirm your team can run the failover test on its own
How we support
- Offer ongoing support, upgrades and repeat failover testing as a retainer after go-live
- Review each Keycloak minor release for high availability impacts before your planned upgrade window
- Confirm changes to database versions, operator update approvals and the stateless feature move with your team
- Scope any further work, such as new regions or a multi-cluster design, as a separate written engagement

