Load testing Temporal with Omes

Load testing with Omes shows whether a self-hosted Temporal cluster can carry peak load before production traffic arrives. This page covers the test design, the metrics that matter and how results become shard and node decisions.

On this page

Why load testing Temporal with Omes comes before go-live

A self-hosted Temporal cluster has to carry a known peak, and the team needs measured evidence that it can, not assumptions about capacity. Load testing before go-live is the only way to show that the cluster sustains the expected workflow starts, activity throughput and signal volume at the latency the business requires. Omes is the load generation and scenario tooling that Temporal's own project uses to exercise a server under realistic workload shapes, so teams can replay representative traffic instead of guessing from a single synthetic benchmark. Custom scenarios are the other route when your workflows have shapes that a generic scenario does not reproduce, such as long timers, large payloads, heavy fan-out or bursty signal traffic. Either way, the test answers a specific question: at the peak you have defined, does the cluster hold, and where does it fail first?

Load testing is needed at more points than the first launch. Run it before go-live, before a major traffic event such as a seasonal peak or a product launch, and after any change that alters the capacity model, including a change to the history shard count, a move to a different persistence store, a change in how many history or matching hosts run, or a major server upgrade. Those changes shift where contention appears, so an earlier result no longer describes the cluster you run. Confirm the exact Omes version and its supported scenarios against the Temporal release you plan to run, since the tooling and the server move together.

The result depends on the stack under test. Temporal documents several deployment methods, including Docker Compose, Go binaries, Helm charts that run each server service in its own Kubernetes pods, and a custom Go build. It also documents separate persistence stores (Cassandra, PostgreSQL and MySQL, each with its own supported versions) and separate advanced visibility stores. Each combination changes database latency, the number of hosts behind each service and visibility write load, so a test on a laptop or a single-container setup proves very little about production. Run the test on a stack that matches production in deployment method, persistence and visibility backend, network path, and the sizing of database and worker resources. Ask your partner or internal team to write down every difference that remains, because those differences define the limits of what the results can prove.

Test approaches and when each fits

This table compares three ways to load test a self-hosted Temporal cluster: Omes built-in scenarios, custom scenarios that mirror production workflows, and staged ramps against sustained soaks. Read each row for what the approach proves, what it leaves untested and how much effort it adds, then combine approaches so the final run reflects your peak. The main takeaway is that a generic benchmark alone rarely proves your production shard and node counts.

ApproachWhat it provesWhat it missesEffort it adds
Omes built-in scenariosThe cluster handles standard workflow and activity shapes at a chosen throughput, and gives a comparable baseline across runsYour workflow sizes, payload sizes, timer patterns and child workflow fan-out, so results may not match your peakLow: configure the existing scenarios, the database and worker setup, then run
Custom scenarios that mirror productionYour own workflow types, activity mix, signal rates and history lengths sustain your measured peak on the sized shard and node countsFailures that only appear at scale beyond your current peak, and any load your production traffic has not yet reachedHigh: model production traffic from your metrics, write workers and workflows, and validate the scenario against real volumes
Staged rampThe point where latency, backlog or errors start to rise as load increases, which shows headroom and the first bottleneckBehavior over hours, such as database growth, cache pressure, retention cleanup and slow memory leaksMedium: define load steps and hold times, and capture metrics at each step
Sustained soakThe cluster stays stable at target load over a long period, including history growth and persistence housekeepingPeak bursts, sudden spikes and failover events, unless they are added to the runMedium to high: long-running infrastructure, continuous monitoring and a plan for cleaning up test data
Combined ramp and soakHeadroom at known load and stability at the sized target, which is the evidence most sizing decisions needFailure injection such as node loss or database failover, which needs a separate testHigh: the sum of the staged ramp and soak effort, plus test environment time

Running a load test on a self-hosted cluster

This sequence produces a load test that reflects the production setup, runs in isolation, and records the health signals needed to decide whether the cluster can carry peak load. Each step builds on the last so that results can be trusted and repeated.

  1. Match the test cluster to production

    Build the test environment from the same deployment method, Helm chart version, and persistence and visibility backends planned for production. For server images 1.30 and later, confirm the Helm chart version is at or above 0.73.1, since earlier chart versions do not work with those images. The platform team owns this step, and it is done when a configuration diff between the test and production values files shows only differences in scale, such as replica counts and node sizes. Differences in database engine or visibility store invalidate the results, so record any that remain.

  2. Set the target server version and upgrade order

    Test against the Temporal Server version you plan to run in production, not the version you happen to have installed. If the test cluster must start from an older version, follow the documented upgrade order: move one minor version at a time, go to the latest patch of each minor first, and run schema upgrades before server upgrades when the release notes call for them. The step is complete when the test cluster reports the planned version and the upgrade notes for each hop have been checked and recorded.

  3. Create a dedicated load test namespace

    Create a namespace used only for the load test so that its traffic does not mix with other workloads and its metrics can be read in isolation. Set the namespace retention and any rate limits to the values planned for production, so the test measures the real configuration. The step is done when the namespace exists with the production settings and no other clients can reach it from the test environment.

  4. Define the workload shape with Omes

    Use Omes, or a custom scenario if your workflows differ, to describe the workload: the workflow types, activity counts per workflow, payload sizes, timers, signals and the workflow start rate. Base these figures on measured production traffic or a documented forecast, and state the peak you intend to prove. Record the scenario definition in version control so it can be rerun unchanged. The step is complete when the scenario file is reviewed by the application owner and matches the expected production mix.

  5. Ramp load in defined steps

    Start below the expected peak and increase the start rate in fixed stages, holding each stage long enough for the metrics to settle. Keep worker counts and task queue configuration constant during the ramp so that changes in results come from load alone. Stop increasing when a check fails, and note the rate at which that happened. The step is complete when the ramp has either reached the target peak with all checks passing or has identified the first stage where a limit was reached.

  6. Record persistence latency and database health

    At each ramp stage, record persistence latency and error rates from the Temporal server metrics and the database's own monitoring. Watch for rising latency per read and write, connection pool saturation and throttling from the database. The output is a table of latency and error values per stage, which the team uses to judge whether the persistence layer, rather than the Temporal services, is the constraint.

  7. Check task queue backlog and history service health

    At each stage, check task queue backlog, schedule-to-start latency, and the health and resource use of the history and matching services. A backlog that grows during a stage without recovering afterward signals that the cluster cannot keep up at that rate. Record the stage at which backlog first grows and whether history service CPU, memory, or shard lock contention rises with it. The output is a per-stage record that shows which service reaches its limit first.

  8. Turn results into shard and node counts

    Compare the highest stable rate with the target peak and identify the bottleneck from the per-stage records. Use the results to set the history shard count and the number of history, matching, and frontend instances, then rerun the ramp to confirm the change. Confirm with your Temporal specialists that the shard count is appropriate before the cluster is built, since the number of history shards cannot change after the cluster starts. The step is complete when a rerun passes every check at the target peak with a margin you have agreed in writing.

Where load enters and where the measurements come from

The load generator starts workflows and the test workers poll tasks, both through the Temporal frontend, which is the only service the test clients call. The frontend hands work to the history and matching services, and both write state to the persistence store. History also indexes executions into advanced visibility. Metrics collection reads from the services inside the trusted network. Check that every arrow stays within that boundary, and that the metrics path records the same services the load runs against.

Load and metrics paths inside the trusted internal network.

Which metrics to watch and what a bad reading means

A load test is only as useful as the signals you read during it. The six groups below connect what Omes drives through the cluster to where the bottleneck sits, so a failing run points to a specific component rather than a general sense that the cluster is slow. Read them together, and confirm exact metric names and alert thresholds against the Temporal server metrics documentation for your version.

Schedule-to-start latency

This measures how long a task waits in a task queue before a worker picks it up. Rising values during a load run usually mean too few workers, exhausted worker slots, or pollers that cannot keep up, not a slow history service. Check worker slot utilization and poller counts first, then compare results with the same run at a higher worker count. If the latency stays flat while workers are idle, look at matching instead.

Persistence latency and error rates

Persistence latency tracks how long the database takes to answer history and matching writes and reads. A climb that tracks request rate suggests the database is the limit, and errors or timeouts at the store layer point to connection pool exhaustion or an undersized database. Compare the figures against the database's own CPU, IOPS and lock metrics before changing Temporal settings. Check the persistence documentation for the supported database versions you are testing against.

Persistence docs

Task queue backlog

Backlog is the count of tasks waiting in a task queue that have not been dispatched. A backlog that grows for the whole run means dispatch is slower than task creation, which can come from workers, matching capacity or a single hot task queue partition. A backlog that drains between bursts is usually acceptable at peak. Record backlog alongside schedule-to-start latency, because one without the other can hide a problem.

History service load per shard

Load per shard shows whether work is spread evenly across history shards or concentrated on a few. Uneven shard load points to hot workflow IDs, a poor key distribution in your scenario, or a shard count too small for the target throughput. Shard count is fixed at cluster creation, so an imbalance found here usually means revisiting the scenario design or the cluster plan rather than tuning at runtime.

Frontend rate limit rejections

Rate limit rejections show requests the frontend refused because a host or namespace exceeded its configured request rate. Rejections during a run that otherwise looks healthy mean the test is measuring the limiter, not the cluster. Confirm which limit applies to your namespace and whether the test traffic was meant to exceed it before reading the rest of the results as capacity.

Visibility store indexing lag

Indexing lag is the delay between a workflow state change and its appearance in visibility queries. If your application or operators list or search workflows during peak load, a growing lag means the visibility store, often Elasticsearch or OpenSearch, is the bottleneck even though workflows complete normally. Check the supported visibility store versions and confirm the indexing rate your store can sustain with your team before the test.

Visibility docs

Turning test results into shard and node counts

The purpose of the load test is to produce a sizing decision, and the most important part of that decision is the history shard count. The value of numHistoryShards is fixed once the cluster starts, and changing it later means rebuilding the cluster, so the team must finish its Omes runs before it commits to a shard count. Start by recording the sustained throughput at the target peak, the workflow and activity start rates, and the point at which latency or error rates began to climb. Those numbers, not a guess about future growth, are what the shard count and service counts should be derived from. Confirm the shard count range that Temporal documents for production clusters in the Temporal self-hosted deployment guide before you finalize the number.

Translate saturation into replica counts service by service. Compare CPU, memory, database latency and queue depth for the frontend, history, matching and worker processes at the point where the test began to degrade. The frontend is stateless, so add replicas there when request handling saturates. History replicas follow shard ownership, so a common starting point is one history process per 500 shards, which the team should treat as a hypothesis to validate with its own results, not as a rule. If history CPU or persistence latency is the first bottleneck, more history processes or a different shard count may be needed, and only a retest will show which. Keep the database sizing in the same review, because adding history processes raises load on the persistence store.

Plan headroom above the measured peak before you write the number down. The right margin depends on the business's tolerance for degraded latency, how quickly the team can add capacity and how sharply demand spikes, and each of those is a question to answer with the stakeholders who own the service rather than a fixed percentage. Record the test configuration, Omes version and cluster settings next to the results so the sizing can be reproduced. After any change to the shard count, server version, persistence layer, node sizes or dynamic configuration, rerun the same scenarios and compare against the baseline. A sizing that was valid before an upgrade is not evidence that it still holds after one.

Security controls the load test must respect

A load test sends large volumes of real workflow traffic at a Temporal Service, so the test environment needs the same access and data controls as production. The cards below cover where the cluster sits, which namespaces it touches, how authorization is set, what data it carries and who may start a run. Check each one before the first run, and record the settings so the test reflects production.

Keep the cluster off the internet

Temporal services should run on hosts that are not reachable from the public internet, with network access limited to trusted internal networks. Load test clusters are often stood up quickly on cloud instances or in a shared cluster, and that is where exposure happens. Confirm that the frontend, the internode ports and the database and visibility stores have no public addresses or open ingress rules. Load generators should reach the frontend over an internal path only.

Security docs

Never load production namespaces

Omes runs create many workflows and activities in whatever namespace they target, and that traffic competes with real work for history shards, matching capacity and frontend rate limits. Give the test its own namespace on a dedicated cluster where possible, and confirm that the namespace name and endpoint in the run configuration point at test infrastructure. A misconfigured environment variable is the most common way production gets loaded by mistake.

Watch the default noopAuthorizer

If no Authorizer is configured, self-hosted Temporal uses the default noopAuthorizer, which allows every API request with no authentication or access control. A test cluster left at this default is open to anyone who can reach its frontend, including through a forgotten port or a shared network. Configure an Authorizer and a ClaimMapper in the test environment, and verify with a request from an unauthorized identity that it is refused.

Security docs

Match mTLS and authorization to production

Load results only mean something if the test path carries the same overhead as production. Keep mTLS settings for internode and frontend traffic, the ClaimMapper rules and the Authorizer in line with production, so TLS handshakes and authorization checks are included in the measured latency. Record the configuration version used for each run so a later result can be compared against the same setup.

Use synthetic data only

Omes scenarios generate their own payloads, and those payloads should contain only synthetic values. Do not copy production workflow inputs, activity results or search attributes into custom load scenarios, because these are stored in the persistence layer, visibility store and logs during the test. Confirm that payload sizes match production without carrying personal or regulated data. Agree with the data owner which fields the test scenarios may reproduce.

Control who starts large runs

A single large run can saturate a shared cluster, so starting one should be an approved action with a named owner. Limit who holds credentials for the load generator and the target namespace, and require a written run plan with the target environment, expected peak, stop condition and contact person. Keep the ability to stop a run from a second person, and log each run start with the identity that initiated it.

Questions teams ask before running Temporal load tests

How much does it cost to load test a self-hosted Temporal cluster?

The cost is mostly the test environment and people, not a license, because the Temporal server is MIT licensed. Four components add up: a load generator fleet, a test copy of the persistence and visibility stores sized close to production, the time an engineer spends designing scenarios and reading results, and any cloud or data center capacity used for the run. Most of these are one-time for the first test and recur with each major release, each capacity change or each new workload. Ask any partner for a quote that lists each component separately, states which environment it uses and says how many test cycles are included.

How long does a Temporal load test take to plan and run?

Duration depends on how many workload shapes you need to prove, how much of your production traffic can be reproduced, and how long your database takes to build a realistic dataset. Planning covers the peak you expect, the workflow and activity mix, retention settings and the target latencies. Each run then needs time for warm-up, the sustained peak and a cool-down, followed by analysis. Teams rarely get a usable first result in a single session, so plan for several iterations. Ask for a timeline tied to named milestones rather than a single number.

What does the client need to provide for a load test?

The client supplies the inputs that make the results meaningful. These include the expected peak start and execution rates, the workflow and activity shapes with payload sizes and history length, the target namespace layout, retention periods, and a non-production environment with the same server version, persistence engine and network path as production. The client also grants access to metrics and logs, and names an owner who can approve test traffic against shared systems. Without these inputs, the test measures a different system from the one you will run.

Can our own team run Temporal load tests without a partner?

Yes, if you have engineers who already operate the Temporal server and its persistence layer, and who can write load scenarios in an SDK your workers use. Omes is an open-source load testing tool for Temporal, so the tooling itself has no license cost. The harder work is scenario design, building a realistic dataset, and interpreting shard, persistence and schedule-to-start metrics together. Teams without that experience often spend the most time on the analysis step. A partner can run the work alongside your team so that knowledge stays in-house.

Which metrics should we watch during a Temporal load test?

Watch the metrics that show where the cluster first becomes constrained. At minimum, track frontend and history request latency and error rates, persistence latency and throughput, schedule-to-start latency for workflow and activity task queues, and worker slot saturation. Also record CPU and memory per service and the rate of shard ownership changes. Confirm the exact metric names and dashboards against the Temporal documentation for your server version before you build the panels, because names change between releases.

What goes wrong when Temporal load test results are misread?

The most common error is reading a bottleneck in the wrong layer. A slow workflow often comes from too few workers or exhausted slots, not from the history service, so adding history nodes wastes money and leaves the real constraint in place. Other errors include testing with an empty database that hides persistence latency, using a load generator that saturates before the cluster does, and changing several settings at once so the cause of a gain is unknown. Keep each run to one variable and record the configuration with every result.

How do load test results turn into shard and node counts?

Results inform the sizing decision, but the history shard count is fixed when the cluster starts, so the test must be run against the shard count you plan to use. Compare sustained throughput and latency at target peak to the thresholds you set, then increase the service count for whichever service saturates first. Repeat at a higher load to find headroom. Keep a safety margin for growth and failures, and document the assumptions. Ask a partner to show the sizing worksheet and the raw results so your architects can check the reasoning.

Do we need to load test again after an upgrade?

Yes, if the upgrade changes the server version, the persistence schema, the Helm chart or a dynamic configuration default that affects throughput. Temporal Server should be upgraded one minor version at a time, so a jump across several minor versions also means several rounds of testing. Repeat tests add engineer time and environment cost each cycle, but a smaller regression suite reuses the scenarios and dataset from the first engagement. Confirm with your partner which tests are included in the retained scope after the initial run.

How DeployOpen scopes and delivers Temporal load testing

DeployOpen scopes load testing for your self-hosted Temporal cluster in writing before work starts, then runs the tests in infrastructure you control. The output is measured evidence of what your cluster can carry at peak, with the shard and node counts that follow from it.

How we scope

  • Agree the target peak load, workflow and activity mix, and latency goals with your platform and application owners.
  • Confirm the Temporal Server version, persistence and visibility stores, and the environment the tests will run against.
  • Write down which Omes scenarios or custom scenarios are in scope, and which dashboards and metrics the results must cover.

How we build

  • Set up Omes or custom load scenarios on test infrastructure that matches the production topology as closely as agreed.
  • Run baseline, sustained and peak tests, and record frontend, history, matching and database metrics for each run.
  • Turn the results into a shard and service count recommendation, and retest after each change to confirm the effect.

How we hand over

  • Deliver the test plan, scenario definitions, raw results and a written analysis tied to your agreed load targets.
  • Document the configuration used, the bottlenecks found and the limits of what the tests did and did not prove.
  • Walk your operations and capacity teams through the metrics to watch and the thresholds that should trigger a review.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before testing starts.
  • Ongoing support, upgrades and repeat load testing before major releases or traffic growth are available as a retainer.
  • Ask for a quote based on the written scope, which covers environment, scenario count and the retest cycles included.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.