Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDU-3861: High Availability [prototyping] #3314

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
9 changes: 3 additions & 6 deletions docs/evaluate/temporal-cloud/pricing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ tags:
- Pricing
- Support
---
import DiscoverableDisclosure from '@site/src/components/disclosures/DiscoverableDisclosure';

Temporal Cloud is a consumption-based service.
You pay only for what you use.
Expand Down Expand Up @@ -75,11 +76,7 @@ Active and Retained Storage allocations are translated into GBh at a rate of 1GB
Actions are the primary unit of consumption-based pricing for Temporal Cloud.
They track billable operations within the Temporal Cloud Service, such as starting Workflows, recording a Heartbeat or sending messages.

<details>

<summary>
[Toggle to View] The following operations result in Actions:
</summary>
<DiscoverableDisclosure label="Operations that result in Actions">

**WORKFLOWS**

Expand Down Expand Up @@ -154,7 +151,7 @@ Each execution of a Schedule accrues three actions:
- The underlying Temporal primitives (such as Workflows, Activities, and Signals) created by a Nexus Operation handler (directly or indirectly) result in the normal Actions for those primitives billed to the handler’s Namespace.
This includes retries for underlying Temporal primitives like Activities but _not_ for handling the Nexus Operation itself or a retry of the Nexus Operation itself.

</details>
</DiscoverableDisclosure>

[Reach out](https://pages.temporal.io/contact-us) to our team for more information or to help size your number of Actions.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: best-practices
title: best-practices
sidebar_label: Best Practices
slug: /cloud/high-availability/best-practices
description: Temporal Cloud's replicated Namespaces offer automated failover, synchronized data replication, and high availability for workloads requiring disaster-tolerant deployment and 99.99% uptime. Use Global Namespace for self-hosted.
tags:
- Temporal Cloud
- Production
- High availability
keywords:
- availability
- explanation
- failover
- high-availability
- replication
- namespaces
- temporal-cloud
- term
---

This page collects best practices related to high availability Namespaces.
94 changes: 94 additions & 0 deletions docs/production-deployment/cloud/high-availability/enable.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
id: enable
title: Enable high availability features
sidebar_label: Enable high availability features
slug: /cloud/high-availability/enable
description: Temporal Cloud's High-Availability Namespaces offer automated failover, synchronized data replication, and high availability for workloads requiring disaster-tolerant deployment and 99.99% uptime. Use Global Namespace for self-hosted.
tags:
- Temporal Cloud
- Production
- High availability
keywords:
- availability
- explanation
- failover
- high-availability
- replication
- namespaces
- temporal-cloud
- term
---

You can enable high availability (HA) features for a new or existing Namespace by adding a replica.
When you add a replica, Temporal Cloud begins the replication of ongoing and existing workflows.
Once the replication is complete and the replica is ready, your Namespace is ready for failover.

Advantages of using Temporal Cloud’s HA features:

- No manual deployment or configuration needed, just simple push-button operations.
- Existing Workflows resume seamlessly in the replica with minimal interruption and data loss.
- No changes needed for Worker and Workflow code during setup or failover.
- 99.99% contractual SLA.

## High availability features

:::tip Support, stability, and dependency info

Single-region replication is in [Public Preview](/evaluate/development-production-features/release-stages#public-preview) for Temporal Cloud.

:::

Temporal currently offers the following HA features, which you can configure at a Namespace level.
See the “Enable high availability features” section for more details.

- Single-region replication: Workflows are seamlessly replicated to a different isolation domain within the same region as the Namespace, such as "us-east-1".
This option is a good fit if your application is architected to be in a single-region and you would prefer to failover within the same region.
- Multi-region replication: Workflows are seamlessly replicated to a different region that you can choose.
This option is a good fit if your application is architected to be multi-region and your business requires multi-regional availability.

There are charges associated with Replication and enabling high availability features.
For pricing details, visit Temporal Cloud's [Pricing](/cloud/pricing) page.

## Create a high availability Namespace {#create}

To create a new replicated Namespace, you can use the Temporal Cloud Web site or the `tcld` command line utility.
The following table explains how:

| Approach | Instructions |
|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Temporal&nbsp;Cloud&nbsp;Web&nbsp;UI** | 1. Visit Temporal Cloud in your Web browser. <br /> 2. During Namespace creation, specify the active region for the Namespace. <br /> 3. Select "Add a replica". <ul><li>Adding a replica in the same region enables Replication.</li><li>Adding a replica in a different region enables Multi-region Replication.</li></ul> |
| **Temporal&nbsp;`tcld`&nbsp;CLI** | At the command line, enter: <br /> <tt>tcld namespace create \ <br /> &nbsp;&nbsp;&nbsp;&nbsp;--namespace \<namespace_id>.\<account_id> \ <br />&nbsp;&nbsp;&nbsp;&nbsp;--region \<active_region> \ <br /> &nbsp;&nbsp;&nbsp;&nbsp;--region \<replica_region></tt> <br /> <br /> Specify the [region codes](/cloud/service-availability) as arguments to the two `--region` flags. <ul> <li>Using the same region replicates to an isolation zone within that region.</li> <li>Using a different region within the same continent creates a multi-region Namespace.</li> </ul> Before pressing return, add your authentication credentials. For example, `--ca-certificate-file <path-to-pem-file>`. |

:::tip

Replication is not supported in all regions.
For multi-region replication, pairing is limited to regions within the same continent.

:::

## Upgrade an existing Namespace to high availability functionality {#upgrade}

Upgrade an existing single-region Namespace to high availability features by establishing a replica.
The following table explains how:

| Approach | Instructions |
|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Temporal&nbsp;Cloud&nbsp;Web&nbsp;UI** | 1. Visit Temporal Cloud Namespaces in your Web browser. <br /> 2. Navigate to the Namespace details page. <br /> 3. Select the “Add a replica” button. <br /> 4. Choose either **Replication** (in the same region) or **Multi-region Replication** (across regions). <ul><li>If you select Multi-region Replication, specify which region.</li></ul> The web interface will present an estimated time for replication to complete. <br /> This time is based on your selection and the size and scale of the Workflows in your Namespace. <br /> An email alert is dispatched once your highly available Namespace is ready for use. |
| **Temporal&nbsp;`tcld`&nbsp;CLI** | At the command line, enter: <br /> <tt>tcld namespace add-region \ <br /> &nbsp;&nbsp;&nbsp;&nbsp;--namespace \<namespace_id>.\<account_id> \ <br />&nbsp;&nbsp;&nbsp;&nbsp;--region \<replica_region></tt> <br /> <br /> Specify the added [region code](/cloud/service-availability) as an argument to the `--region` flag. <ul><li>Using the current region replicates to an isolation zone within your existing region.</li><li>Using a different region within the same continent creates a multi-region Namespace.</li></ul> <br /> Before pressing return, add your authentication credentials.<br />For example, `--ca-certificate-file <path-to-pem-file>`. <br /> An email alert is sent once your multi-region Namespace is ready for use. |

## Discontinue high availability replication {#discontinuing}

Removing a Namespace replica disables high availability and automatic failover features.
Follow these steps to disable these features and end high availability charges:

1. Navigate to the Namespace details page in Temporal Cloud.
2. On the "Region" card, select the option to "Remove Replica."

Temporal Cloud deletes the replica.
Your Namespace will no longer be highly available and you will no longer be charged for this feature.

:::note

After removing a replica, Temporal Cloud can't re-enable replication in the same region for a given Namespace for seven days.

:::
Loading