Skip to main content

Estimate Actions for migration

Before you migrate from a self-hosted Temporal Service to Temporal Cloud, you can measure your current Action usage to help predict your Cloud usage and costs.

Use server metrics to estimate Actions per second (APS) and peak load. Use representative Workflow Execution Histories to understand how many Actions a typical Workflow Execution creates. Estimate storage separately from Actions.

For details about which operations count as Actions in Temporal Cloud, see Temporal Cloud Actions.

Choose an estimation method

Use one or more of the following methods depending on what you need to estimate.

MethodUse it to estimateNotes
Self-hosted server metricsAPS, peak APS, and Action counts over a fixed time rangeBest for sizing Namespace limits and understanding usage patterns.
Workflow Execution History samplesActions per representative Workflow ExecutionBest for understanding workload shape by Workflow Type. Some Actions do not appear in Event History.
Storage estimatesEvent History storageStorage is priced separately from Actions.

Estimate APS from self-hosted server metrics

Temporal Server versions later than 1.17 provide an action metric. Use this metric to estimate Actions per second from a self-hosted Temporal Service.

Temporal Server versions 1.22.3 and later provide an action metric that more closely reflects current Temporal Cloud Action pricing, including Local Activity metering. For Temporal Server versions from 1.17 through 1.22.2, use the action metric to understand server load, but do not treat it as a precise billable Action estimate.

To calculate total APS, use the following PromQL query:

sum(rate(action{service_name="frontend"}[1m]))

To calculate APS by Namespace, use the following PromQL query:

sum(rate(action{service_name="frontend"}[1m])) by (exported_namespace)

Depending on your metrics exporter setup, the Namespace label might be namespace instead of exported_namespace.

For a Grafana dashboard example, see the server-general.json dashboard in the Temporal dashboards repository.

For Datadog, use a query like the following to calculate Actions per second:

sum:io.temporal.server.action.count{$server-name}.as_rate()

Estimate Action counts over a fixed time range

To estimate total Actions during a fixed time range, use increase() over the range you want to measure.

For example, to estimate total Actions over 30 days, use the following PromQL query:

sum(increase(action{service_name="frontend"}[30d]))

To estimate Actions for one Namespace, add the Namespace label:

sum(increase(action{service_name="frontend", exported_namespace="default"}[30d]))

When you run fixed-range queries in Grafana, set the end of the dashboard time window to the end of the date range that you want to measure. For example, to measure Actions for the 30-day period ending March 31, set the dashboard end time to March 31.

Estimate Actions from Workflow Execution Histories

You can estimate Actions per Workflow Execution by counting billable events in representative Workflow Execution Histories. This method is useful when you need to understand how much Action usage a Workflow Type creates.

  1. Choose representative Workflow Executions for each Workflow Type.
  2. Download the Event History for each Workflow Execution from the Web UI or API.
  3. Count the events that map to Temporal Cloud Actions. For the list of Action types and corresponding History Event types, see Temporal Cloud Actions.
  4. Multiply the Action count by the expected number of Workflow Executions in the period you want to estimate.

This method produces an estimate. Some Actions do not appear directly in Event History, including Queries and some Activity Heartbeat Actions. If you use Global Namespaces, account for the additional Action and storage cost. Estimate storage separately from Workflow Action counts.

Estimate storage separately

Temporal Cloud storage is priced separately from Actions. To estimate storage, collect the following information:

  • Event History size for representative Workflow Executions.
  • Retention Period for closed Workflow Executions.
  • Duration for open Workflow Executions.
  • Expected number of Workflow Executions.

For current storage pricing, see Temporal Cloud pricing.

Share estimates with Temporal

When planning an automated migration, share the following information with your Temporal account team:

  • Peak APS for each Namespace.
  • Average APS for each Namespace, if available.
  • Fixed-range Action counts, such as total Actions over the last 30 days.
  • Representative Workflow Types and their estimated Actions per Workflow Execution.
  • Retention Periods and storage estimates.

These estimates help Temporal plan capacity, Namespace limits, and migration timing.