RealmDeployDocs
Platform

Architecture

What a tenant is made of, and the path a request takes from your users to Keycloak and its database.

What a tenant is made of

PartWhat it is
KeycloakThe official Keycloak image, pinned by digest. On Premium and Enterprise, two or more replicas, clustered with each other, with sessions kept in the database. They are spread across nodes where possible, and at least one keeps running during cluster maintenance. Starter runs one replica
PostgreSQLA PostgreSQL 17 cluster of its own, managed by CloudNativePG, with its own keycloak database and credentials: a primary and a streaming replica on Premium and Enterprise, a single instance on Starter
BackupsContinuous archiving of database changes and a nightly full backup to object storage in the same cloud and region (Azure Blob Storage on Azure, Amazon S3 on AWS), in storage only your tenant can write to. See Backups and point-in-time restore
Your hostnameAn HTTPS listener for your hostname, with a Let's Encrypt certificate that renews automatically. See Custom domains and TLS
MonitoringMetrics and alerts for Keycloak, the database, backups and the certificate. See Monitoring and incidents

A tenant can hold more than one realm. Keycloak and its database are never shared with another customer.

The path of a request

  1. Your user's browser or your app looks up your hostname, for example auth.example.com. Your DNS record points it at the hostname we give you.
  2. The request reaches our cloud load balancer and our gateway (Envoy Gateway, through the Kubernetes Gateway API). This entry point is shared by all tenants.
  3. The gateway ends TLS with your tenant's certificate. Plain HTTP is redirected to HTTPS.
  4. Only three paths are passed on, to your Keycloak and no other:
    • /realms: sign-in pages, the OpenID Connect and SAML endpoints, and the account console
    • /resources: the scripts, styles and images those pages load
    • /admin: the admin console and the admin REST API
  5. Your Keycloak (one of its replicas, on Premium and Enterprise) answers, reading from and writing to your PostgreSQL.

Every other path answers 404. Keycloak's health and metrics endpoints are on a separate port that is never routed from the internet; only our monitoring reads them.

The gateway removes any X-Forwarded-* headers a client sends and sets its own, so Keycloak sees the real client address and scheme.

Region

Everything above runs in the cloud and region you choose, including backups: Azure Kubernetes Service in Microsoft Azure West Europe (Netherlands), or Amazon EKS in AWS Frankfurt (eu-central-1) or AWS N. Virginia (us-east-1). The architecture is the same in each.

On this page