Load testing Zitadel before go-live: what it proves and when to run it
Load testing a self-hosted Zitadel with the published k6 tests shows how your deployed topology behaves under the login, token, introspection and user management traffic you expect. It answers whether your Zitadel pods, PostgreSQL database, reverse proxy and network path hold the request rates and concurrency your customers or workforce will generate, and where latency and error rates begin to climb. It does not prove that your identity providers, email or SMS delivery, or passkey flows will perform under load, because those depend on systems outside Zitadel. It also does not prove long-running stability, security posture or correct access policy. Before the test, ask your team to confirm which scenarios in the k6 suite match your version of Zitadel and your planned login and API patterns.
Run the test after configuration freeze and before go-live. By that point, identity settings, login policies, Actions, rate limits, database sizing, proxy settings and the Zitadel version should be fixed, so the results describe the system you will launch. Use a staging environment with the same topology as production, including the same number of replicas, connection limits and proxy layer, and load it with a user and organization volume close to what you expect at launch, since the amount of data in the database affects read paths. Repeat the test after any change to those components, after a Zitadel upgrade, and after a database major version change. A result from a different topology does not carry over to production.
DeployOpen runs the load tests inside your own infrastructure, so load generators, test users and captured metrics stay within your cloud accounts, data centers or private networks. Your team controls which services receive load and when, and test credentials are handled under your existing secrets practices. Before any run, agree the acceptance criteria in writing, including target request rates, latency thresholds, error budgets and the metrics to collect, such as Zitadel and PostgreSQL resource use and proxy response times. Confirm who approves load against shared systems such as an upstream identity provider or a shared database, and who receives the results. The written scope sets what is tested, what is excluded and what a retest looks like.
How k6 test traffic reaches Zitadel and PostgreSQL
The test starts at the k6 runners outside the production-like network, which is the trust boundary to review before any load is sent. Requests cross the load balancer or ingress into the Zitadel pods, which read and write the PostgreSQL database, while Zitadel's metrics go to a separate metrics backend. Check that the test instance and its seeded users exist only in the test environment, and that the load balancer's timeouts and connection limits match what you are measuring.
Load moves from isolated runners through the ingress into Zitadel and its database.
Which scenarios to run: login, token, introspection and user management
The published k6 tests group Zitadel traffic into four families, and each one stresses a different part of the system. Running all four before go-live shows whether interactive sign-in, token issuance, token validation and administrative writes hold up together, not just in isolation.
Login flows
This family drives interactive browser sign-in through the hosted login, with the OIDC authorization request, login screens and redirects back to the client. It stresses the login container and the event-sourced write path, since each sign-in records session events. Watch error rates on the authorization and callback steps, latency per redirect, and database write latency while concurrency rises. Confirm with your team which identity provider or passkey path the test mirrors, because that changes the work per login.
Passkeys docsToken issuance
This family requests tokens from the token endpoint using the grant types your applications actually use, such as authorization code exchange and client credentials for service accounts. It exercises signing key access and the write path that records token-related state. Watch token issuance latency at the tail, error responses under concurrency, and whether signing key lookups stay fast as load grows. Compare results against the grant mix your production clients will generate, not an assumed mix.
Token introspection
This family calls the introspection endpoint so resource servers can validate opaque or reference tokens. Its load shape is high-frequency reads with little interactive state, which means it can dominate traffic in API-heavy products. Watch throughput per instance, response time under sustained load, and whether the database and caching layers keep pace. Confirm with your architects how many validation calls each user action triggers, because that multiplier sets the realistic load.
User management writes
This family runs administrative operations such as creating and updating users, and assigning roles or grants through the management API. It stresses write consistency and the projections that rebuild read models after each change. Watch write latency, the lag before changes appear in queries, and any errors from concurrent updates to the same organization. Plan these runs separately from sign-in tests, since provisioning jobs and SCIM sync often hit this path in bursts.
Test environment and test profile choices, and when each fits
This table compares the main choices for a Zitadel load test: environment shape, deployment target, instance sharing, test profile and seeded data volume. Read each row against what you need to prove before go-live, and note the column on what the choice cannot show. Sizing values must come from your own traffic targets and Zitadel's benchmark material, not from this page.
| Choice | When it fits | What it cannot prove |
|---|---|---|
| Staging environment that mirrors production topology | Final go-live sign-off, when you need results that carry over to production (same proxy, TLS termination, database version and replica count) | Production behavior under real traffic mix, and it does not account for noisy neighbors on shared infrastructure you do not control |
| Smaller environment with reduced replicas or database resources | Early runs that check scripts, dashboards and error handling before a full test | Capacity headroom at production size, since database and pod limits scale differently from a reduced setup |
| Kubernetes with the official Helm chart | When production runs on Kubernetes, so probes, autoscaling, pod disruption budgets and ingress behave as they will live | Behavior of a Docker Compose or binary deployment, which may differ in connection handling and scaling |
| Docker Compose or binaries | Quick functional checks or when production uses the same non-Kubernetes target | Pod-level scaling, rolling update behavior during load, or the resilience of a Kubernetes cluster |
| Dedicated test instance | Load runs that create many users and organizations, since it keeps test data out of production instances and makes cleanup predictable | Behavior of the instance that holds your real tenants, including its specific data volume and configuration |
| Shared test instance | Ongoing regression checks where several teams need the same environment and the load is light | Isolation effects, since load from one test can distort results for other users of the same instance |
| Ramp profile | Finding the load level where latency or error rate starts to rise, and checking how login, token and introspection scale | Stability over long periods, such as slow memory growth, connection leaks or projection lag that appears only after hours |
| Soak profile | Holding a steady load for an extended period to surface leaks, resource creep and background job effects | The peak capacity limit, because a steady load below saturation does not show where the system breaks |
| Seeded test users and organizations, at your expected volume | Realistic query and projection behavior, since lookup and listing costs depend on how many users and organizations exist | Growth beyond the seeded volume, so plan a second run at higher volume if your tenant count is expected to rise |
| Seeded test users and organizations, at a small volume | Fast iteration on scripts and assertions before the full data set is loaded | Any conclusion about user management or organization-scoped queries at production scale |
Set up the k6 test run in order, with a check at each step
This sequence confirms that the test targets the right Zitadel release and database, builds a staging environment that resembles production, and runs progressively heavier load so each stage ends with evidence you can act on. Each step closes with a check that decides whether the next step may start.
Confirm the release and PostgreSQL version under test
Pick the Zitadel release you intend to ship and record its exact version from the zitadel/zitadel releases page on GitHub. Check the self-hosting database documentation for the PostgreSQL version you plan to run, since Zitadel supports PostgreSQL 14 through 18. The platform engineering lead or Zitadel administrator owns this step. It is done when the release tag and PostgreSQL major version are written in the test plan, and the plan states that both match the production target.
Build a staging copy that matches production
Stand up a staging environment with the same PostgreSQL major version, the same deployment method (Kubernetes with the Helm chart, Docker Compose or binaries), and the same proxy and TLS path that production uses, including any HTTP/2 proxy in front of the login and API endpoints. Ask your infrastructure team to confirm node sizes, connection limits and any PgBouncer layer are the production values, not defaults. The check is a written diff between staging and production that lists every difference you accepted, with the reason for each.
Create a dedicated test instance with seeded data
Create a separate test instance and organization so load never touches real tenants or the production event store. Seed users in volumes that match your expected daily active population, and create a service user with the management permissions the scripts need for user management calls. Store the service user's credentials in your secrets manager, not in the test repository. The check is a successful management API call and a successful login by one seeded user, performed by hand before any load is applied.
Obtain and version-match the published k6 scripts
Download the k6 test scripts Zitadel publishes for login, token, introspection and user management scenarios from the project's repositories. Confirm that the scripts' version matches the Zitadel release you recorded in step one, and pin the script version in your repository. If the scripts and the release do not match, ask Zitadel or your delivery partner which script revision to use before running anything. The check is a recorded commit or version for the scripts beside the Zitadel version in the test plan.
Run a short smoke pass
Run each scenario at a low, fixed virtual user count for a short period to confirm the scripts authenticate, the tokens validate and the introspection calls return active results. Watch the Zitadel pod logs and the PostgreSQL connection count during the run. The engineer running the test should not proceed if any scenario returns authentication or authorization errors. The check is zero errors from the smoke pass, and a note of the baseline connection count and pod restart count before ramping.
Ramp the load in stages
Increase virtual users in stages across login, token, introspection and user management scenarios, holding each stage long enough to see steady behavior. Keep the scenarios separate in the results so a slow user management path does not hide a healthy login path. Stop the ramp at the first stage where error rate or latency breaks your agreed threshold. The check is a per-scenario table of error rate, latency percentiles and throughput for each stage, with the stage where limits were reached named.
Run the soak and collect the closing metrics
Hold a load level near your expected peak for a longer period to reveal slow leaks, growing connection use and projection lag. Collect Zitadel and PostgreSQL metrics, database connection use, disk I/O, and pod restart counts throughout the run. Compare the final results against the benchmark figures Zitadel publishes for its own tests, noting where your hardware or database configuration differs. The check is a soak report showing flat connection use, no unexplained pod restarts and error rates that stay within the agreed threshold from start to finish.
Which metrics to collect and how to compare with Zitadel's benchmark results
Collect k6 results and infrastructure metrics in the same time window, or the numbers cannot be read against each other. For each scenario (login, token issuance, introspection and user management), record latency percentiles at the median and the tail, the error rate, and the request throughput the test actually achieved. Then align those series with Zitadel pod CPU and memory, PostgreSQL active and waiting connections, transaction and lock activity, and disk I/O on the database volume. A login scenario that slows while database connections saturate points to a different fix than one that slows while pod CPU is pegged. Set the k6 summary output and the metric exporters to the same timestamps, and keep the raw k6 output so percentiles can be recalculated if the first analysis is questioned.
Treat Zitadel's published benchmark results as a reference point, not a pass mark. A comparison is only meaningful when hardware, PostgreSQL version, deployment topology (replica count, proxy, database placement) and the test profile (virtual users, scenario mix, think time and run length) all match the published setup. Before you compare, confirm which Zitadel release and which hardware produced the figures, since the current release line has moved on from the one you may find in older material. Take the figures from Zitadel's benchmark documentation directly, and record in your test report which fields differ from that setup. Where they differ, the honest result is a baseline for your own environment, not a pass or fail against Zitadel's numbers.
Use the comparison to decide what to tune and what to ask about. If your throughput is well below the reference while database resources are idle, check connection pooling and Zitadel replica settings first. If the database is the constraint, plan the sizing change before go-live rather than after. Before changing any Zitadel defaults, ask Zitadel's engineers or support, since the event store and projection behaviour under load is not something to adjust by trial in production. Keep the final baseline with the release, configuration and hardware used, so the next upgrade test can be compared on equal terms.
Security and data risks during load tests
A load test puts real stress on identity infrastructure, and the test itself creates data, credentials and logs that carry risk. The cards below cover the controls to set before the first request is sent, so the test does not disrupt users, expose personal data or leak privileged access.
Keep tests off live users
A load test against a shared or production instance can lock out live users, exhaust database connections or trip rate limits meant for real traffic. Run the scenarios against a dedicated environment built from the same configuration as production. If a production-like run is unavoidable, agree a window with the owners, set a stop condition, and confirm which login and token endpoints the test will hit before it starts.
Use synthetic test users only
Test users created for login and user management scenarios must not contain real names, email addresses or phone numbers. Generate obviously fake identifiers and use domains reserved for testing. Delete every test user and related grants after the run, and confirm the deletion in the database, since a leftover account is a personal data record you must now govern.
Scope management API credentials
Service users that call the management API during a test should hold only the roles the scenario needs, scoped to the test organization. Set a rotation date, record who holds the key, and remove the service user when the test ends. Broad administrator credentials used for convenience become a standing path into your identity system.
Zitadel APIs docsIsolate test runners from secrets
Test runners generate heavy traffic, so restrict their network access to the Zitadel endpoints under test and block access to the database and internal admin paths. Do not place the masterkey or database credentials on the runner. Use a separate, least-privilege database role if the test needs to read state, and keep runner hosts out of your production trust zones.
Apply retention to test telemetry
Metrics, traces and logs captured during a test can contain user identifiers, client IDs, IP addresses and token-related fields. Store them under the same retention rules and access controls you apply to production telemetry, and do not copy them to a general analytics bucket. Decide the retention period before the run, not after.
Self-hosting overviewSet rate limits on purpose
Any rate limiting configured for the environment should be chosen and tested deliberately, not left at whatever the test environment happens to have. Confirm which limits apply to login, token and management calls, then run the test at expected and peak levels to see whether throttling blocks legitimate scenarios or fails to block abusive ones. Record the settings used so results can be reproduced.
What buyers ask about load testing Zitadel before go-live
How long does a Zitadel load test take from start to finish?
The duration depends on how much planning, environment work and analysis the scope includes, rather than on the k6 scripts themselves, which run in a fixed window you choose. Expect time for agreeing the load profile and success criteria, building a staging environment that matches production topology, running the scenarios and then analyzing database and Zitadel metrics for bottlenecks. Each test cycle also takes time to repeat after a fix. Ask for a written timeline that separates these phases, and confirm which phase depends on your change approvals or data preparation.
What does a load testing engagement cost, and what does a quote cover?
DeployOpen does not publish prices, and a quote follows from a written scope. The cost is mainly test engineering time, plus any staging infrastructure you need to rent or run, and the report and retest work. A useful quote names the scenarios covered (login, token, introspection and user management), the target environment and topology, the number of test cycles, the metrics analysis, the written report and whether a retest after fixes is included. Ask which items are one-time and which would recur if you retest after each upgrade.
Can our internal team run a Zitadel load test without outside help?
Yes, if the team has the skills to build and read the test. The work needs k6 scripting, enough Kubernetes or Docker knowledge to deploy the test target and the load generators, and PostgreSQL monitoring skills to read query latency, connection counts and disk I/O during a run. Someone must also be able to interpret Zitadel metrics and decide when a result is a real limit. Confirm these skills in your team before choosing between an internal run and a partner, and consider whether a second pair of eyes on the analysis is worth the cost.
What do we need to provide before a Zitadel load test can start?
A load test needs a non-production environment that resembles production, with the same Zitadel version, database version and proxy layout. You will need to provide access to that staging environment, seeded test data with realistic user, organization and project counts, and read access to the metrics and database dashboards. You also need a change window in which the environment can be stressed without affecting other teams. Agree in advance who can stop a run, and how test accounts and any federated identity providers are handled so no live customer data is involved.
Does a passing Zitadel load test prove our system is ready for go-live?
No. A passing test proves only the load profile, data volume and topology that were tested, and nothing beyond them. If production traffic has more daily active users, a different login mix, heavier user management activity or a different database sizing, the result may not hold. Before go-live, compare the tested profile with your expected peak, record the headroom found, and decide which gaps to close. Treat the result as evidence for a defined capacity claim, not as a general readiness approval.
When should we repeat a Zitadel load test after go-live?
Repeat the test after changes that can alter the performance profile. These include Zitadel version upgrades, changes to database version or sizing, changes to the number of Zitadel replicas or the connection pooling layer, changes to the reverse proxy or load balancer, and significant configuration changes. Growth in users or organizations beyond the tested profile is another trigger. Plan the retest as part of the change process, so the same k6 scenarios run against the new setup and results are compared with the earlier baseline.
Which Zitadel metrics and database signals should we collect during a load test?
Collect Zitadel request latency and error rates for each scenario, along with pod resource use and restart counts. On the database side, record query latency, active connections, lock waits, disk I/O and replication lag if you run replicas. Capture the same signals across each run so you can compare baselines. Confirm the exact metric names and dashboards with your Zitadel version, since they can change between releases. Keep the k6 output alongside the infrastructure data so a bottleneck can be traced to its source.
Limits to confirm before you rely on the results
A load test only answers the question you asked when the scripts, hardware, configuration and release match what you run in production. The cards below list the assumptions to check before you treat any result, or any comparison with Zitadel's published benchmarks, as evidence for your go-live decision.
Script version and release match
Confirm which k6 scripts Zitadel currently publishes and whether they target the release you deploy. Scenario endpoints, request shapes and expected responses can change between versions, so a script written for an older release may pass or fail for reasons unrelated to capacity. Record the script commit or tag next to the Zitadel version in your test report so a rerun uses the same inputs.
Zitadel releasesBenchmark hardware and topology
Find out the hardware, node count, database sizing and configuration behind Zitadel's published benchmark results. A figure measured on a different CPU count, database tier, connection limit or network path tells you little about your own deployment. Treat the benchmark as a reference point for shape and trend, not as a capacity commitment for your infrastructure.
Setup needed for management and login scenarios
Check whether the management API and login scenarios require extra setup before they run, such as an identity provider to federate against, a service user with specific grants, or seeded test organizations. Missing setup often produces errors that look like performance problems. Write down every precondition so the test environment can be rebuilt identically before each run.
Load balancer and HTTP/2 path
Confirm that your load balancer, ingress and TLS termination handle HTTP/2 the way the tested path does. A proxy that downgrades connections, limits concurrent streams or buffers differently changes latency and throughput at the edge. Test through the same hostname, certificate chain and proxy hops that real clients use, and note any hop the benchmark did not include.
Self-hosting overviewRelease currency at go-live
Check whether the release you chose is still current on the day you test and on the day you go live. The latest documented release at the time of writing was v4.19.5, released on 15 October 2026. Review the release notes for changes to the event store, projections, database requirements or API behavior since your test build, and retest if the gap is material.
Zitadel releasesLicense obligations for modified builds
Confirm with counsel whether any change you make to Zitadel core, Console or hosted login creates obligations under the GNU Affero General Public License 3.0, which applies to those components from v3.0. Tuning configuration or running the published tests may not, but patches to the server or login pages may. Settle this before you benchmark a modified build, because the results and the code you tested will both need to be shared under the terms that apply.
Apache to AGPL postHow DeployOpen plans and runs Zitadel load tests
DeployOpen scopes, runs and documents load tests for self-hosted Zitadel inside the client's own infrastructure. The work starts from the traffic the client expects, so the test results can be compared with what goes live.
How we scope
- Agree in writing which login, token, introspection and user management flows are in the load test.
- Confirm the target environment, its database sizing and the Zitadel version under test before any run.
- Define the pass criteria, test duration and the metrics the client's teams will review after each run.
How we build
- Prepare the published k6 test scripts against a staging copy of the production-like Zitadel deployment.
- Configure the metrics collection so latency, error rates and database load are captured during each run.
- Run baseline, load and soak scenarios in sequence, recording results against Zitadel's published benchmark figures.
How we hand over
- Deliver a written report with test configuration, raw results, observed bottlenecks and recommended next steps.
- Provide the k6 scripts and run instructions so the client's own team can repeat the tests after changes.
- Walk through the findings with the engineers who will operate Zitadel after go-live.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Retesting after tuning or a Zitadel upgrade can be included in the agreed scope.
- Ongoing load testing and upgrade support for Zitadel are available as a retainer.

