How to enable replication
You can enable High Availability (Single-region Replication, Multi-region Replication, Multi-cloud Replication) for a new or existing Namespace by adding a replica. When you add a replica, Temporal Cloud begins the replication of ongoing and existing Workflow Executions. Once the replication is complete and the replica is ready, your Namespace is ready for failover.
Enabling High Availability features
Same-region Replication and Multi-cloud Replication are in Public Preview for Temporal Cloud.
Not all replication options are available in all regions. See the region documentation for the replication options available in each region.
There are charges associated with Replication and enabling High Availability features. For pricing details, visit Temporal Cloud's Pricing page. This page explains how to enable and manage these features.
Create a Namespace with High Availability features
To create a new Namespace with High Availability features, you can use the Temporal Cloud UI or the tcld command line utility. The following instructions explain how:
- Web UI
- tcld
- Visit Temporal Cloud in your Web browser.
- During Namespace creation, specify the primary region for the Namespace.
- Select "Add a replica".
- Choose the region for the replica.
The web interface will present an estimated time for replication to complete. This time is based on your selection and the size and scale of the Workflows in your Namespace.
Temporal Cloud sends an email alert to all Namespace Admins once your Namespace replica is ready for use.
At the command line, enter:
tcld namespace create \
--namespace <namespace_id>.<account_id> \
--region <primary_region> \
--region <replica_region>
Specify the region codes as arguments to the two --region
flags.
- Using the same region replicates to an isolation domain within that region.
- Using a different region replicates across regions.
If using API key authentication with the --api-key
flag, you must add it directly after the tcld command and before namespace create
.
Upgrade an existing Namespace with High Availability functionality
Upgrade an existing standard Namespace by adding High Availability features. Adding a replica unlocks that functionality.
The following instructions explain how:
- Web UI
- tcld
- Visit Temporal Cloud Namespaces in your Web browser.
- Navigate to the Namespace details page.
- Select the “Add a replica” button.
- Choose the region for the replica.
The web interface will present an estimated time for replication to complete. This time is based on your selection and the size and scale of the Workflows in your Namespace.
Temporal Cloud sends an email alert to all Namespace Admins once your Namespace replica is ready for use.
At the command line, enter:
tcld namespace add-region \
--namespace <namespace_id>.<account_id> \
--region <replica_region>
Specify the region code of the region where you want to create the replica as an argument to the --region
flag.
If using API key authentication with the --api-key
flag, you must add it directly after the tcld command and before namespace add-region
.
Temporal Cloud sends an email alert once your Namespace is ready for use.
Change a replica location
We discourage changing the location of your replica for deployed applications, except under exceptional circumstances. Changing the location of your Namespace replica will result in a mandatory 7-day waiting period before you can re-enable High Availability Namespace features.
Temporal Cloud can't change replica locations directly. To update the location, you need to remove the current replica and add a new one. Follow these steps to change the replica location:
- Remove your replica. This disables High Availability for your Namespace.
- Wait through the required 7-day waiting period.
- Add a new replica to your Namespace.
You will receive an email alert once your Namespace is ready for use.
Discontinue High Availability features
Removing a Namespace replica disables High Availability and automatic failover features. Follow these steps to disable these features and end High Availability charges:
- Web UI
- tcld
- Navigate to the Namespace details page in Temporal Cloud
- Select the option to "Remove Replica" on the "Region" card.
At the command line, enter:
tcld namespace delete-region \
--namespace <namespace_id>.<account_id> \
--region <replica_region>
If using API key authentication with the --api-key
flag, you must add it directly after the tcld command and before namespace delete-region
After following these instructions, Temporal Cloud deletes the replica. Your Namespace will no longer use High Availability features and you will no longer be charged for this feature.
After removing a replica, Temporal Cloud can't re-enable replication for a given Namespace for seven days.