Run Keycloak in high availability for a public sector identity service
Keycloak high availability rests on three things: at least two server nodes sharing a database, a distributed cache for sessions and a load balancer that honors health checks. Keycloak is Apache-2.0 licensed and an incubating project at the Cloud Native Computing Foundation (licence, CNCF, checked 23 Nov 2026), so there is no licence fee: you pay for the operating. OSStend engineers design the nodes, the PostgreSQL beneath them and the Infinispan cache configuration, then run upgrades without logging users out where the release allows. A typical public sector design runs three nodes across zones, enables health endpoints for the load balancer and keeps realm exports in version control. The upgrade path, not the first install, is where identity services fail, so it is rehearsed on a copy of your realms before every release.
45 minutes with an engineer: we review your workload and sketch the design.
- ✓Your cloud account
- ✓Public sector
- ✓Run
- Where it runs
- Your cloud account or data center
- Engine
- Keycloak, Apache-2.0
- Layout
- Three nodes, managed PostgreSQL
- Cache
- Distributed sessions across nodes
- Typical timeline
- 4 to 7 weeks
Typical situation
Trigger. Login for citizens and staff must stay up through node loss and upgrades.
Versions. A current Keycloak 26.x release on PostgreSQL.
- Login must not stop for patches
- Data stays in your own account or region
- Realm changes need review and history
A typical situation, not a named customer.
OSStend runs Keycloak in high availability with three nodes across zones, PostgreSQL beneath them and a distributed cache for sessions behind a health-checked load balancer. Keycloak is Apache-2.0, and upgrades are rehearsed on a copy of your realms first.
Customers
Partners
- PostgreSQL
- MySQL
- MongoDB
- Redis
Valkey
- OpenSearch
- Kafka
- RabbitMQ
- AWS
- Google Cloud
- Azure
- Kubernetes
- OpenShift
- Prometheus
- Grafana
- Datadog
- Dynatrace
- Splunk
What OSStend runs and what you keep
OSStend runs Keycloak and its database. You own the realms, clients and the people who approve changes.
| Area | OSStend | You |
|---|---|---|
| Node layout | Three nodes across zones with health endpoints enabled | Approve the layout |
| Cache and discovery | Distributed cache with a cluster discovery method suited to your platform | Nothing |
| PostgreSQL | Managed with backups and failover | Nothing |
| Load balancer | Health-checked rules, hostname and proxy settings | Provide the load balancer or let us build it |
| Realm configuration | Export to version control, restore tested | Own realm and client decisions |
| Upgrades | Rehearsed on a copy, then rolling where supported | Approve the window |
| Theme and providers | Deployed with the release | Own branding and custom code |
| On call | Engineers 24/7 | Reach us by phone or ticket |
Where it can run
Public bodies often have to keep identity data in a region or facility they control.
| Option | When it fits | Licence and source |
|---|---|---|
| Our cloud | Policy allows a hosted dedicated service | Apache-2.0 (licence, checked 23 Nov 2026) |
| Your cloud account | A region or sovereign cloud you control | Same licence. See fips and sovereign options. |
| Your data center | Identity must stay in your facility | Same licence |
How we run it
We build high availability first and migrate realms second, so users move to a platform that already survives a node loss.
Review realms and load (3 to 5 days)
We count users, logins per minute at peak, identity providers and custom extensions.
Design (1 to 2 weeks)
We choose node count, cache setup, database size, hostname and proxy settings, and the upgrade method.
Build (1 to 2 weeks)
Nodes, PostgreSQL and the load balancer are built. We test node loss with live sessions.
Migrate realms (1 to 3 weeks)
Realms and clients are imported, then connected applications are moved in a planned order.
Run (from day one)
We run it 24/7 on the how it works model.
Cost basis
Keycloak has no licence cost, so the cost is three small nodes, a database and the operating fee.
Compare a managed identity service billed per monthly active user with a fixed cluster. A fixed three-node cluster costs about the same at 50,000 or 500,000 users until login load needs more nodes, which is why we size from peak logins per minute and not from user count.
| Driver | Per-user service | Self-run cluster |
|---|---|---|
| Unit of billing | Monthly active users | Nodes and database |
| Growth effect | Rises with users | Flat until peak load grows |
| Licence | Included in the fee | None, Apache-2.0 |
| Data location | Vendor choice | Your account or data center |
| OSStend fee | Not applicable | Quoted per design |
A structural comparison with no vendor price. Model your own figures with the TCO calculator.
What we watch on call
Identity outages come from a few repeating causes. We watch for these.
- Cache cluster split.
- Nodes that cannot see each other keep separate sessions. We alert on cluster size.
- Database latency.
- Slow queries slow every login. We watch connection counts and query times.
- Failed health checks.
- A node that fails readiness must leave the pool. We watch the load balancer view.
- Certificate expiry.
- An expired certificate stops logins everywhere. We alert 30 days out.
- Brute-force load.
- Login spikes can overwhelm hashing. We watch CPU and use rate limits.
- Upgrade drift.
- A realm migration can change behavior. We diff exports before and after.
When OSStend is not the right fit
This fits public bodies that must control where identity runs and need predictable upgrades.
Contact us if
- ✓Login must survive node loss
- ✓You need identity in a region you control
- ✓You have many applications to federate
- ✓You want a team to carry the pager
Not a fit if
- ✕You want a hosted identity product with a vendor UI
- ✕A single node would meet your uptime need
- ✕You rely on features of a commercial fork
- ✕You need no custom configuration at all
Questions buyers ask
These are the questions we hear most on this situation. Each answer is general; the design review settles the figures for your estate.
How many nodes do we need?
Typically three across zones, so one can be lost or upgraded while two serve users. Peak logins per minute set the real number.
Can upgrades avoid logging users out?
Where the release supports a rolling upgrade, yes. Otherwise we plan a short window and rehearse it. We tell you which applies before the date.
Where do sessions live?
In a distributed cache across the nodes, with a persistent option in recent releases. The design states the setup.
Can we federate to our existing directory?
Yes. Keycloak federates to LDAP and other identity providers. We configure it with you.
Related pages
- Deployment · Data residencyData sovereignty cloud and residency optionsData sovereignty cloud options: OSStend runs PostgreSQL, Kafka and more in the region you pick, in your own cloud account or in your data center.
- How it worksHow OSStend works: design, move, runOSStend designs your cluster around the workload, moves it in with zero downtime and runs it 24/7. See the three steps and what turnkey services leave out.
- Tools · CostManaged database cost calculatorFree managed database cost calculator: price one cluster self-run, on a cloud database service and with managed providers, from sourced, dated list prices and your team's time.
Plan a resilient identity service
Share your peak logins and zone layout and we will size the cluster.
- ✓A design sketch for your workload, not a plan menu
- ✓A zero-downtime cutover path for what you run today
- ✓A price for that design, after the review





