Zitadel performance tuning for the event store and projections starts with the write path
Teams that see slow logins, delayed user changes or timeouts under load need to understand where Zitadel spends its time before they change any setting. Zitadel stores every change as an event in its event store, and that store is the source of truth. Projections are read models built from those events, and they are eventually consistent, so a change can be written successfully and still take a short time to appear in queries, logins or the Console. Self-hosted Zitadel uses PostgreSQL as its database, and versions 14 through 18 are supported according to the Zitadel database documentation. Most performance problems we see at this layer trace back to database CPU, memory, connection capacity and disk I/O rather than to Zitadel's own settings.
Plan this work before go-live, when you run load tests against realistic login, token and user management traffic. Plan it again after any incident involving slow sign-ins, stale user data or request timeouts, and before a major upgrade that changes projection behavior. Start by confirming the PostgreSQL version and its server sizing, the storage class under the database, and how many connections the Zitadel pods open in total. Then compare latency at the database with latency at the Zitadel API and at the proxy in front of it, so you can tell whether the write path or the read path is the bottleneck. Ask the database team for write latency and I/O wait during the slow period before you touch any Zitadel configuration.
Tuning levers and when each one fits
This table compares the levers an operator can change when Zitadel is slow under load, from database resources to client timeouts and Zitadel defaults. Read each row for when it fits and what it risks, and treat any row marked as needing Zitadel engineer confirmation as a change to agree before it reaches production.
| Lever | When it fits | Risk and confirmation |
|---|---|---|
| PostgreSQL CPU, memory and storage | Write latency or event store queries are slow and database metrics show saturation or I/O wait on the Zitadel database | Low risk to Zitadel behavior, but cost rises with size; confirm supported PostgreSQL versions (14 to 18) first |
| Connection pool sizing | Zitadel pods wait for database connections while the database still has headroom | Too many connections overload PostgreSQL; confirm the pool settings and total connection budget with Zitadel engineers |
| Replica and pod count | Request load is high and pods show CPU pressure while the database is healthy | Extra pods add database connections and load on the same event store; scaling without database headroom moves the bottleneck |
| Push and request timeouts at the client | Callers time out during bursts of writes while Zitadel still completes them | Longer timeouts hide latency and can pile up requests; shorter timeouts cause retries that add load; confirm retry behavior with Zitadel engineers |
| Retry policy at the client | Transient errors from short saturation windows need recovery without user-visible failure | Aggressive retries amplify load on an already slow write path; use backoff and limit attempts |
| Projection-related settings | Read models lag behind writes and users see stale data after changes | Changing projection behavior affects consistency guarantees; confirm with Zitadel engineers before any change |
| Zitadel configuration defaults | A documented setting clearly matches your load profile after measurement | Defaults are tuned for general use; changing them without engineer review can cause data or ordering issues, so confirm first |
Set up a tuning baseline before changing anything
This sequence fixes the release, database and load conditions first, so every later change to Zitadel's write path, projections or database settings can be compared against a known starting point.
Confirm the Zitadel release and PostgreSQL version
Record the exact Zitadel release you run in production and the PostgreSQL major version behind it. The latest published release is v4.19.5, dated 15 October 2026, so check whether your environment is on it or on an earlier line, and read the release notes for any performance or projection changes that apply to you. Confirm that your PostgreSQL version is within the range Zitadel supports, which is versions 14 through 18, and note the managed or self-run database setup. Done when a single document lists the release tag, the image or binary digest, the PostgreSQL version and the hosting model, and the owner has signed off on it.
Capture baseline metrics and database statistics
Before generating any load, record a quiet-period snapshot of Zitadel's Prometheus metrics, including request latency and error rates for the login, token and management APIs, and the projection progress signals exposed by the release you run. In parallel, capture PostgreSQL statistics for the Zitadel database: active connections, wait events, lock activity, table and index sizes, and the slowest statements. Run this at the same time of day across several days so you know the normal spread. Done when you have a dashboard snapshot and a saved set of database statistics that the team agrees represent normal operation.
Measure disk latency and host resource use
Record disk read and write latency, IO queue depth and CPU and memory pressure on the database host and on the Zitadel nodes. Write-heavy event appends and projection updates both depend on storage behavior, so a baseline without disk numbers cannot explain later changes. Use the monitoring stack your organization already runs. Done when the disk and host figures are stored next to the Zitadel and PostgreSQL snapshots with the same time window, and you can state the normal p95 write latency for the database volume.
Run a representative load with the published k6 tests
Use the k6 scenarios Zitadel publishes for login, token, introspection and user management to generate traffic that matches your expected mix, not a single endpoint. Keep the environment, data volume and load profile fixed, and record the test duration, virtual user counts and target request rates. Confirm with Zitadel engineers which scenarios reflect your workload before you start, because a mix that is wrong at the start will mislead every later comparison. Done when one run completes with saved k6 output and the matching server-side metrics, and a second identical run produces results close enough to trust.
Watch projection lag and PostgreSQL wait events during load
During the baseline load, watch how far projections trail the event store, how long push operations wait before they are processed, and which PostgreSQL wait events dominate. Look for lock waits, IO waits and connection waits, and note whether projection lag grows during the run and recovers afterward. Also count timeouts, retries and errors returned to clients. Done when you can describe, in writing, the single most constraining resource under baseline load and the projection lag you consider acceptable for your application.
Change one variable at a time
Pick one setting or one resource to change, such as a database connection limit, a disk size, a replica count or a push or retry setting, and write down the value before and after. Changing several variables at once makes results impossible to attribute. Ask Zitadel engineers before changing any default in the event store, projection, push or retry configuration, because those settings interact with consistency and ordering. Done when the change record names the variable, the old and new values, the reason and the rollback step.
Retest and compare against the baseline
Repeat the same k6 scenarios, duration and load profile, then compare the new run with the saved baseline on request latency, error and timeout rates, projection lag, PostgreSQL wait events and disk latency. Keep the change only if the targeted signal improves and no other signal regresses beyond the tolerance you agreed. Record the outcome whether it helped or not. Done when the comparison report is filed with the change record and the team decides to keep, revert or investigate further.
How a write request moves through Zitadel to PostgreSQL and projections
A write starts at a client, passes through a reverse proxy to the Zitadel API, and is recorded as events in the event store tables in PostgreSQL. Projection handlers then read those events and update the read tables that queries use. The gap between the event write and the projection update is where a read can return stale data. When you tune performance, check how long that gap stays open under load, and confirm with Zitadel engineers before you change projection or push defaults.
Writes land in the event store first, and read tables catch up through projection handlers.
Push timeouts and retries: where they come from and how to set them
Write latency in Zitadel passes through several layers, and each layer can give up before the others do. Timeouts and retries at the client, the proxy and inside Zitadel interact, so a change in one place can multiply load in another. Confirm the exact retry and timeout behavior for your Zitadel version before you edit any of these settings.
Client-side timeouts
Every application, SDK or script that calls Zitadel's APIs sets its own request timeout, and many libraries ship with defaults that were never chosen for your environment. If the client gives up while Zitadel is still processing a write, the caller sees a failure even though the change may have been committed. Check each client's timeout against the slowest write you expect under peak load, and log the request IDs so you can match client timeouts to server-side records.
Reverse proxy and load balancer limits
Ingress controllers, reverse proxies and load balancers in front of Zitadel have their own idle, read and upstream timeouts. A proxy that closes the connection before Zitadel responds produces errors that look like Zitadel failures. Compare proxy timeouts with the client timeouts and with the self-hosting guidance for your deployment, and test a slow write through the full path before go-live.
Retries that amplify load
When a client retries a timed-out write, Zitadel may still be processing the first attempt, so one user action can become two or more writes competing for the same database resources. Retries multiply during an incident, which is when the database is least able to absorb them. Limit retries to a small number with exponential backoff and jitter, and watch for retry storms in access logs and metrics before you raise any limit.
Idempotency of retried writes
A retry is only safe when repeating the request cannot create duplicate or conflicting changes. Before you add automatic retries to user management, organization or project calls, decide which operations your application can repeat, and use the idempotency mechanisms that the Zitadel APIs documentation describes for your version. Where none applies, design the caller to check state before it retries, and test that a duplicate call returns a clear result.
Zitadel APIs docsTimeouts and database latency
Write latency is largely set by the time PostgreSQL takes to commit events and by contention on the same rows and disks. A client timeout that is shorter than normal database latency under load will fail requests that would have succeeded. Measure database commit time and disk latency during a load test, then set timeouts with headroom above that measured figure rather than from a default. If you see timeouts only at peak, treat the database as the first suspect.
Database docsQuestions teams ask before tuning Zitadel performance
Can our own team tune Zitadel performance without outside help?
Yes, a team with PostgreSQL and Kubernetes experience can often tune Zitadel itself, provided it measures before it changes anything. Start by confirming the baseline: which endpoints are slow, whether the bottleneck is the database, Zitadel pods or the proxy, and whether projections are falling behind. Many problems come down to database resources, disk I/O or connection limits rather than Zitadel settings. The work becomes harder when the team lacks a staging environment that matches production, cannot reproduce the load, or needs to change defaults that Zitadel engineers should review first. Ask whether a fixed-scope review would cover your gaps.
What drives the effort and cost of a Zitadel performance investigation?
The main cost is skilled time, split between your staff and any outside specialist. Effort rises with the number of tenants and instances, the size of the event store, the complexity of the login and token flows, how many environments you must test, and how much telemetry already exists. Costs recur if you run load tests or retune after each upgrade, and they are one-time for a single investigation. A quote should list who does which tasks, the environments used, the load profile to be tested, the deliverables, and what happens if findings require changes to the database or infrastructure. DeployOpen does not publish prices, so the figure follows from the written scope.
How long does a performance tuning investigation take?
The duration depends on scope, and this page does not give one. A narrow review of a single slow endpoint with existing metrics takes far less time than a full review covering event store growth, projection lag, database tuning and repeated load tests across several environments. Timelines also depend on how quickly you can provide access, staging capacity and test windows. Ask for a timeline in the written scope that names each phase, the environments involved and the dependencies on your team. Zitadel's own documentation and release notes are useful for checking which settings are version specific.
What must our team provide before a tuning review starts?
Plan to provide four things: metrics, logs, a staging environment and a load profile. Metrics should cover Zitadel pods, the PostgreSQL server (CPU, memory, disk latency, connections) and the proxy in front of Zitadel. Logs should show push timeouts, retries and errors from the same period. A staging environment should match the production Zitadel version, database version and resource limits as closely as possible. The load profile should describe the real mix of logins, token requests, introspection and user management calls, along with peak rates. Confirm your Zitadel version and the supported PostgreSQL version range from the Zitadel database documentation before you begin.
When should we ask Zitadel engineers before changing default settings?
Ask Zitadel engineers before changing defaults for event store write behavior, push timeouts and retry settings, or any setting that affects how projections catch up. Changes in these areas can alter data consistency, increase write pressure on the database or behave differently between releases. Ask before changing settings that you cannot reverse easily, such as schema or projection-related configuration, or when a fix requires an upgrade. Adjusting database resources and disk I/O is usually an infrastructure decision, but confirm the approach with the vendor if it affects Zitadel's assumptions. Record each change, its reason and the test results so you can roll it back.
Does Zitadel Enterprise support change how performance tuning works?
Enterprise adds custom support agreements and technical account management, according to Zitadel's pricing page. These can shorten the path to a vendor answer and give you a named contact for performance questions. They do not replace your own measurement, staging tests or database administration, and they do not remove the need to agree a written scope. Ask what the Enterprise agreement covers in writing: response expectations, escalation paths, access to engineers for configuration questions and any limits on support for self-hosted deployments. Confirm pricing directly with Zitadel, since this page does not state a figure.
Is a performance review a guarantee of a specific throughput or latency?
No. A review identifies the constraints in your setup, tests proposed changes and documents the results, but it cannot promise a fixed throughput or latency. Results depend on your hardware, database, network, data volume and the load you actually run in production. Ask for a clear description of what is measured, the test conditions and the acceptance criteria agreed before work starts, so both sides know what success looks like.
Security and operational considerations while tuning
Tuning the event store and projections touches the database, the Zitadel configuration and the data that both hold. The cards below cover the controls that keep a tuning change reversible, auditable and safe for personal data, so that a performance fix does not become an availability or data incident.
Change control for database and config changes
Treat every database parameter and Zitadel configuration change as a versioned, reviewed change with a named owner, a stated reason and a measured baseline. Record the current values of connection limits, pool sizes and timeouts before editing them, and change one variable at a time so the effect on push latency and projection lag is attributable. Confirm with Zitadel engineers before changing defaults that affect event handling, rather than inferring safety from a general PostgreSQL guide.
Access to production database credentials
Tuning often requires querying event tables and checking projection state, which means database access that can read identity data at scale. Restrict production credentials to a small group, use separate read-only roles for diagnostics, and keep administrative roles out of routine workflows. Log who connected, when and from where, and rotate the credentials after any tuning engagement that involved shared access.
Keeping the masterkey and backups consistent
Zitadel encrypts sensitive data with a masterkey, so a backup restored without the matching key cannot be read. Before a change that alters schema, storage or database layout, take a fresh database backup and confirm the masterkey is stored separately with a recorded version. Verify that the backup, the key and the Zitadel release notes all refer to the same configuration, and document the restore sequence before the change starts.
Avoiding personal data in load tests and debug output
Load tests and debug sessions generate large numbers of users, tokens and login attempts, and their logs and traces can carry email addresses, identifiers and token fragments. Generate synthetic identities for load tests, set log levels deliberately during diagnosis, and redact or exclude fields before sharing traces with vendors or contractors. Confirm where traces and metrics are stored and who can read them.
Rollback plans for each tuning step
Write the rollback for each change before applying it: the previous parameter values, the command or deployment that restores them, and the observable signal that triggers the rollback, such as rising push timeouts or growing projection lag. Test the rollback in a staging copy of the environment, and agree with the operations team how long the change can stay in place before it is reviewed or reverted.
How DeployOpen scopes and delivers Zitadel performance work
DeployOpen approaches Zitadel performance tuning as a scoped engagement inside your own infrastructure, starting from measured behavior of the event store, projections, database and disk. Work is fixed-scope, with written deliverables, and ongoing support is available as a retainer.
How we scope
- Agree in writing which Zitadel version, deployment model and PostgreSQL version the tuning covers.
- Define the symptoms in scope, such as slow logins, delayed projection updates or push timeouts, with the metrics that show them.
- List which default settings may be reviewed and which changes will go to Zitadel engineers first.
How we build
- Measure baseline event store write latency, projection lag, database resource use and disk I/O before changing anything.
- Test each proposed change in a non-production environment that mirrors your topology, and record the result against the baseline.
- Apply approved changes through your normal change process, with rollback steps written for each setting touched.
How we hand over
- Deliver a written report covering findings, measurements, changed settings, rejected options and open questions.
- Document dashboards, alert thresholds and the signals your operations team should watch after each change.
- Walk your platform and database owners through the runbook so they can repeat measurements and recognize regressions.
How we support
- Offer retainers for ongoing review of performance after Zitadel upgrades, traffic growth or schema changes.
- Retest key scenarios when you upgrade Zitadel or PostgreSQL, and report any drift from the agreed baseline.
- Confirm with Zitadel engineers before changing defaults that affect the event store or projection behavior.

