When a Redis or Valkey cache belongs in a Zitadel deployment
Zitadel's object caches are in beta and disabled by default, so a self-hosted team does not need one to run Zitadel in production. The question is whether your traffic, topology and tolerance for stale data justify turning one on. According to the Zitadel caches documentation, the caches hold frequently read objects so that Zitadel can answer repeated lookups without querying PostgreSQL each time. Three connectors are available: Redis with a circuit breaker, PostgreSQL unlogged tables, and in-memory caches. Each suits a different topology, and the choice is a deployment decision, not a feature toggle.
A shared Redis or Valkey cache helps when several Zitadel API instances serve the same load and read the same objects repeatedly, such as a Kubernetes deployment with multiple replicas behind a load balancer. The Redis connector includes a circuit breaker, so a cache outage should degrade lookups rather than block login. In-memory caches are the simpler option for a single server, because invalidation is not shared between servers. If you run two or more Zitadel servers with in-memory caches, one server can keep serving an object that another has already changed. A single-node Docker Compose or binary install with modest user counts often gains little from any cache, so measure first using the metrics described in your operations plan.
Before enabling anything, confirm three points with your team. First, whether your Zitadel footprint has more than one server process that can answer the same request. Second, whether your observed PostgreSQL load is a real bottleneck, which you can check against query latency and connection use during peak login periods. Third, which Redis or Valkey service your platform team can operate with the high availability and monitoring it needs. A cache adds a component to your recovery plan, so the decision should be written down with its failure behavior. Confirm the connector configuration keys and their behavior for your exact Zitadel version in the caches documentation before you change production settings.
Choosing between Redis, Valkey, PostgreSQL unlogged tables and in-memory caches
This table compares the four Zitadel cache connectors by topology, shared invalidation, extra infrastructure and fit, and it adds a row for choosing Redis or Valkey as the cache server. Read the first three rows to choose a connector, then the last row to choose the server software behind a networked connector. The main takeaway is that the in-memory connector only fits a single Zitadel server, because its invalidation is not shared.
| Option | Topology and shared invalidation | Extra infrastructure and fit |
|---|---|---|
| In-memory cache | Single server only. Invalidation is not shared between servers, so other servers can serve stale objects. | No extra service to run. Suits a single-server setup such as one binary or one Compose host. |
| PostgreSQL unlogged tables | Works with multiple servers because the cache lives in the database all servers already use. | No new service, but it adds write load on PostgreSQL. Confirm the database capacity with your DBA before enabling it. |
| Redis (standalone with circuit breaker) | Works with multiple servers through a shared cache. Zitadel's documented Redis connector uses a circuit breaker so a cache outage does not block requests. | One more service to run, back up and monitor. Plan high availability with Sentinel if the cache must survive node loss, since Sentinel needs at least three instances. |
| Valkey (standalone with circuit breaker) | Same shared-cache model as Redis, using the Redis-compatible connector path with the same multi-server benefit. | One more service to run, with the same operational needs as Redis. Confirm with Zitadel's cache documentation that the connector accepts your Valkey version. |
| Redis versus Valkey as the cache server | Both speak the Redis protocol, so client compatibility is not the deciding factor. Valkey 7.2 and earlier Redis versions are interchangeable, but Redis 7.4 and later data files are not compatible with Valkey. | Valkey is BSD-3-Clause and was forked from Redis before the source-available change. Redis 8.0 and later offer RSALv2, SSPLv1 or AGPLv3 at your choice. Valkey 9.1 is the current stable line, and Redis 8.10 is the current Redis line. Check your organization's license policy and the release line your support contract covers. |
| Choosing a fit | Use in-memory caches for one server, PostgreSQL unlogged tables when you want no new service, and Redis or Valkey when several servers or regions need consistent caching. | Ask for the cache server version, license review and high availability design in the quote, because these drive the operating effort more than the connector choice does. |
Redis or Valkey as the cache server: license and version facts
Zitadel's caches can sit on Redis or Valkey, but the two projects now diverge on license, release lines and data compatibility. The cards below set out the facts to check before you choose a server, so the license review and the version pin happen before anything is deployed.
Redis 8.0 and later license choice
From the general availability release of Redis 8, Redis Open Source can be used under a license of your choice: the Redis Source Available License v2 (RSALv2), the Server Side Public License v1 (SSPLv1) or the GNU AGPLv3. Redis 8.0.0 was published on May 2, 2025. Your team picks the license, so record which one you rely on and have counsel confirm it fits how your organization runs the cache, including any modified code offered as a network service.
Redis licensesRedis 7.4 to 7.8 licensing
Redis 7.4.x to 7.8.x, then called Redis Community Edition, remain under the dual RSALv2 or SSPLv1 license, and neither license is OSI-approved. Redis 7.2.x and earlier stay under BSD-3-Clause. If your platform standard requires an open source license, a 7.4 to 7.8 pin does not meet it, so confirm the version line against your policy before you install the package.
Valkey under Linux Foundation governance
Valkey is licensed under BSD-3-Clause and was forked from open-source Redis just before Redis moved to source-available licenses. It is an open community project under LF Projects, LLC, which holds the Valkey trademarks. Valkey 9.0.0 was published on October 21, 2025, and the current stable line is 9.1, with 9.1.2 published on September 1, 2026. Check the releases page for the current patch level before you pin a version.
Valkey releasesData files from Redis 7.4 and later
Valkey reads and writes RDB and AOF files compatible with Redis OSS 7.2, and existing Redis client libraries connect without code changes. Valkey's migration guide warns that Redis Community Edition 7.4 and later produce data files that are not compatible with Valkey, and it does not cover that path. If you are moving a running cache from those Redis versions, plan a different method and test it, or start with an empty cache, which is usually acceptable for a cache.
Valkey migration guideHow to enable the Redis cache step by step
This sequence takes a self-hosted Zitadel instance from no cache to a verified Redis or Valkey object cache, with a fallback path tested before the setting is trusted in production. Each step closes with a check you can record.
Confirm Zitadel and PostgreSQL versions
Record the Zitadel version you run and confirm your PostgreSQL server is within the supported range of versions 14 through 18. Check the release notes for your Zitadel version and confirm the cache connector is present in that release, since caches are beta and disabled by default. Your team owns this check, and the output is a short version record in your change ticket. Do not start the change until the version record matches the caches documentation for your release.
Decide the cache topology
Choose between a shared Redis or Valkey cache for several Zitadel API and login instances, or in-memory caches for a single server. Redis and Valkey invalidation is shared across servers, while in-memory caches are not shared, so a multi-server setup needs the shared option. Your platform team decides this, and the output is a written decision that names the number of Zitadel servers. Confirm the choice against the caches documentation before provisioning anything.
Deploy a standalone Redis or Valkey instance
Provision one standalone Redis Open Source or Valkey instance inside the same network boundary as Zitadel, with authentication enabled and access restricted to the Zitadel hosts. Decide which license and release line you accept: Redis 8 and later offer several license options, while Valkey is BSD-3-Clause. Your infrastructure team completes this, and the check is a successful authenticated ping from a Zitadel host using the same network path the server will use.
Configure the cache connector and object selection
Add the Redis or Valkey connector settings and choose which object types to cache in the Zitadel configuration file or Helm values. Copy the exact configuration keys, connector names and object options from the Zitadel caches documentation for your version rather than from memory, and store the file under version control. Your platform engineer completes this, and the check is a configuration diff reviewed by a second person that shows only the cache section changed.
Restart the API and login components
Roll the Zitadel API and Login components so both load the new cache configuration, and do this in a planned window with a rollback copy of the previous configuration. Confirm each replica starts cleanly and logs no connection errors to the cache host at startup. Your operator completes this, and the check is healthy readiness probes on every replica with the cache connection logged as established.
Verify cache hits
Run a scripted sign-in and token request set against a test organization, then inspect Redis or Valkey statistics and Zitadel metrics for cache hits and misses. Hits should rise on repeated reads of the same objects after the first request. Your QA or platform engineer records before and after counters in the change record. The check is a measured increase in hits for the selected object types, which confirms the cache is in use.
Test fallback when the cache is unavailable
Stop the cache for a short, controlled interval in a test environment and confirm Zitadel continues to serve requests through its circuit breaker and database path, with errors and latency logged rather than silent failure. Restore the cache and confirm hits resume. Your operator runs this in staging first, and the check is recorded login and token success during the outage plus a clean recovery. Do not run this test in production without a rollback plan agreed in advance.
Document the cache runbook and ownership
Write the runbook covering the configuration file location, the cache owner, the Redis or Valkey upgrade path, the monitoring alerts and the steps to disable the cache. Include the license and version record from the first step so that auditors and security reviewers can trace the choice. Your team lead signs off, and the output is an approved runbook linked from the Zitadel operations record.
Which Zitadel objects to cache and what each choice trades off
Start with the cache settings Zitadel documents as defaults and measure before you widen the scope. Object caching helps because a cached object is served from memory or a fast store instead of being read from PostgreSQL on every request, which reduces repeated database reads for data that changes rarely. The cost of that speed is staleness. A cache is only as correct as its invalidation: if a user's roles, an organization's settings or a login policy changes and a server keeps serving the old copy, access decisions can lag behind reality. Treat every object you add to the cache as a question of how long a stale copy can safely live and who is hurt if it does.
Confirm the object names and cache options against the Zitadel caches documentation for your exact release, because the caches are in beta and disabled by default. Keep your first change small: enable one connector, choose the objects the documentation describes, and record database load, request latency and login behavior before and after. Ask your team to test what happens when an administrator changes a role or disables a user while the cache is warm. If a change does not show up quickly enough, narrow the cached objects or shorten the lifetime before you consider wider use.
Plan the measurement itself before enabling anything. Record query counts against PostgreSQL, p95 latency on the token and login endpoints, and error rates for at least one normal business cycle, and repeat the same measurement after each change. If the gain is small, the simpler configuration is the better one, because every additional cached object is one more path where stale data can hide. Only widen scope when the numbers show a database bottleneck that the cache removes, and when your security owner has accepted the invalidation behavior for each object in writing.
Cache hits return early, misses fall through to PostgreSQL, and an unavailable cache bypasses to the database
The diagram starts with a client request arriving at Zitadel, which checks its object cache before reading the database. A hit is served from the cache. A miss, or a cache that is down, moves the read to PostgreSQL, and the circuit breaker stops Zitadel from waiting on a failing Redis or Valkey connection. Check that the fallback path is tested, because a cache outage should slow requests rather than fail them.
Request path through the cache, with the database fallback and circuit breaker bypass.
Multi-region trade-offs for shared caches
A cache shared across regions is where the invalidation question becomes hard. A Redis or Valkey cache that every Zitadel server reads and writes gives all servers one view of cached objects, but a region that sits far from the cache adds network latency to every lookup, and a replicated cache adds a second question: how quickly does an update in one region reach the others. The in-memory connector avoids the network hop, but it cannot share invalidation between servers, so a multi-server deployment that uses it can keep serving an object another server has already changed. Per-server memory caches are therefore a single-server choice, not a regional one.
Before designing anything across regions, confirm with Zitadel which topologies the cache connectors support. The Zitadel cache documentation describes the connectors and their beta status, and that is the place to check whether a shared cache spanning sites is a supported pattern, whether each region can run its own cache, and how the Zitadel servers in each region should point at it. Ask Zitadel for the expected behavior when a region loses connectivity to the cache, and whether the cache layer is expected to sit in one region with cross-region database access or be duplicated per region. Get the answers in writing before the topology is drawn, because the Redis replication and failover model you pick (for example, Sentinel for high availability in a single deployment) only solves part of the problem across sites.
Document the stale-read tolerance you accept before you turn the cache on. For each object type you plan to cache, write down how long a stale value is acceptable after a change such as a role grant, a user deactivation or an organization setting update, and who signs off on that window. Security-sensitive changes, such as revoking access for a departing administrator, usually need a much shorter tolerance than branding or display data. Then test that window in a staging setup that mirrors your regions, by changing an object in one region and measuring how long the other region still returns the old value. If the measured window is longer than the documented tolerance, the cache scope or the topology needs to change, not the tolerance.
Securing the cache and keeping it highly available
A cache sits between Zitadel and its database, so anyone who can read or write it can influence what Zitadel believes about users, sessions and applications. The four areas below cover who can reach the cache, how it stays up, how the connection is protected and what data ends up in it.
Network isolation and authentication
Keep the Redis or Valkey service on a private network segment that only the Zitadel API and login pods or processes can reach, with no public address and no exposure through a reverse proxy. Turn on authentication so every client must present credentials, and confirm the ACL or password settings with the version you run. Check that the cache port is closed to other workloads in the same cluster or VPC, since a shared cache is a common path for lateral movement.
Valkey Sentinel docsSentinel for high availability
For standalone Redis or Valkey, Sentinel provides automatic failover that promotes a replica to master when the primary fails. The Redis and Valkey docs say a robust deployment needs at least three Sentinel instances, so plan for three Sentinels on separate hosts or failure domains. Sentinel does not apply when you use Redis Cluster, which handles failover itself, so choose one topology deliberately and test a failover before go-live.
Redis Sentinel docsTLS and secrets for the cache connection
Decide whether the connection between Zitadel and the cache uses TLS, and if it does, confirm that your Redis or Valkey build and the Zitadel cache connector support it before you configure certificates. Store the cache password in the same secrets manager or Kubernetes secret process you use for database credentials, and pass it by file or environment variable rather than in a configuration file committed to source control. Plan rotation of the password, which requires restarting clients to pick up the new value.
What cached data may contain
Cached objects can include user, organization, project and application data that Zitadel also stores in PostgreSQL, where secrets are encrypted with the masterkey. Confirm with Zitadel's cache documentation which object types are cached and whether any sensitive values are held in plain form in the cache. Treat the cache as personal data storage for retention and access review, apply the same data handling rules as the database, and document the decision so compliance reviewers can trace it.
Zitadel caches docsQuestions teams ask before enabling a Zitadel cache
Do we need a cache for Zitadel at all?
Not always. Zitadel's caches are in beta and disabled by default, so a working deployment does not depend on them. The reason to enable one is measured pressure: slow login or token responses, high database load on the PostgreSQL instance, or a large number of repeated reads for the same objects under peak traffic. Before enabling anything, collect baseline latency and database metrics under realistic load so you can tell whether the cache changed anything. If the baseline is already acceptable, the cache adds operational surface area without a clear benefit. Treat it as a tuning step that follows measurement, not as a default part of a production build.
How much effort does enabling a Zitadel cache take?
The effort depends mainly on topology and test coverage, not on the configuration keys alone. A single server with an in-memory cache is the smallest change, but it is the one that needs the most care about invalidation, because invalidation is not shared between servers. A multi-server setup with Redis or Valkey adds a new stateful service, failover design, a circuit breaker configuration, and tests that prove stale data does not survive a change to users, roles or grants. Ask any partner to show how they will test invalidation, failover and fallback to PostgreSQL, and how many environments the change must pass through. A quote should reflect those steps, and we do not publish a duration here because none was supplied for this work.
What skills and access does a Zitadel cache project need?
The work needs people who can operate the cache itself, people who can change Zitadel's configuration, and people who can measure the result. On the cache side, the team should understand Redis or Valkey deployment, persistence, memory limits, eviction, Sentinel-based high availability when used, and how to read cache health metrics. On the Zitadel side, someone needs access to the deployment configuration, the database, and the environment where the cache connects. Load testing skills are needed to compare before and after results. Confirm that your team holds these skills, or that a partner will supply them, before scheduling the change. Missing access to any of these areas usually extends the work more than the configuration itself.
Can our own team enable and test a Zitadel cache?
Often yes, if the topology is a single server or a small, well-understood Redis or Valkey setup and your team has the skills listed above. Teams that already run Zitadel and operate Redis or Valkey can follow the Zitadel cache documentation, make the change in a staging environment, and run their own load and failure tests. The harder cases are multi-region deployments, where cache placement and invalidation trade-offs affect data consistency, and environments under regulatory review, where change records and evidence matter. In those cases, a second opinion or a fixed-scope engagement can reduce risk. Decide based on your team's capacity and the consequences of a stale or missing cache entry in your environment.
What does a partner's fixed-scope quote for a Zitadel cache cover?
Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. For a cache change, the written scope should name the topology being changed, the cache type chosen, the objects to be cached, the test plan, and the environments covered. Ask whether the quote includes staging configuration, load testing before and after, failover testing for Redis or Valkey, a rollback procedure, and handover documentation for your operations team. Ask what is excluded, such as hosting the cache service, Zitadel version upgrades, or changes to the PostgreSQL instance. DeployOpen does not publish a price list, so the quote follows from the written scope rather than from a standard rate.
How does Redis licensing affect the choice of cache?
Licensing matters because Redis's terms changed over time. Redis 7.4.x to 7.8.x are under the dual RSALv2 or SSPLv1 license, which are not OSI-approved, while Redis 7.2.x and earlier remain under BSD-3-Clause. Redis 8.0 and later can be used under a license of your choice among RSALv2, SSPLv1 and AGPLv3. Valkey is licensed under BSD-3-Clause and was forked from Redis before the source-available change, and it is backed by the Linux Foundation through LF Projects. Valkey 7.2 is compatible with Redis OSS 7.2 and earlier, but files from Redis 7.4 and later need a different migration method. Have your legal and procurement teams review the license of the exact version you plan to run, and confirm the terms with the vendor or project before you choose.
How DeployOpen scopes and supports a Zitadel cache
DeployOpen treats the cache as one part of a self-hosted Zitadel deployment inside the client's own infrastructure, so scoping starts with the deployment itself: the platform the cache runs on, the number of Zitadel servers, the PostgreSQL setup and the proxy in front of it. Before any work begins, the scope, deliverables and timeline are agreed in a written, fixed-scope agreement. For this topic, that agreement should name the cache connector to be enabled (Redis or Valkey in standalone mode, PostgreSQL unlogged tables, or in-memory caches for a single server), the object types to be cached, the configuration keys to be set, the monitoring and failure behavior to be verified, and the environments where changes will be tested first.
The implementation covers the build and the proof that it works. That typically includes deploying the chosen cache with its persistence and access settings, configuring Zitadel's cache connectors, validating that the circuit breaker behaves as intended when the cache is unreachable, and testing that authentication and administrative flows still succeed with the cache disabled. DeployOpen can also review the security controls around the cache, such as network reachability limited to Zitadel, authentication to the cache, and where cache credentials are stored. Ask the vendor or your own platform team to confirm the exact Zitadel configuration keys and the Redis or Valkey version your environment supports before the agreement is signed, because the Zitadel caches feature is in beta and its behavior can change between releases.
Support continues after handover through a retainer, which is the usual route for ongoing work. A retainer can cover monitoring review, version upgrades of Zitadel and the cache, re-testing after configuration changes, and checks after each Zitadel release that touches caching. Costs come from the written scope and any retainer terms, and the quote should state what is one-time (design, build, test, documentation) and what recurs (support hours, upgrades, retesting). Your team should also ask how the cache is handled during incidents and whether runbooks, rollback steps and ownership of the cache keys are included in the handover.

