diff --git a/docs/cloud/high-availability/enable.mdx b/docs/cloud/high-availability/enable.mdx index b4c2a29488..4d407e9923 100644 --- a/docs/cloud/high-availability/enable.mdx +++ b/docs/cloud/high-availability/enable.mdx @@ -20,6 +20,12 @@ Using private network connectivity with a HA namespace requires extra setup. See There are charges associated with Replication and enabling High Availability features. For pricing details, visit Temporal Cloud's [Pricing](/cloud/pricing) page. +:::tip White paper + +For an in-depth guide covering everything from why you need High Availability to setting it up in production and advanced options, read the [High Availability White Paper](https://temporal.io/pages/high-availability-white-paper). + +::: + ## Create a Namespace with High Availability features {#create} To create a new Namespace with High Availability features, you can use the Temporal Cloud UI or the tcld command line diff --git a/docs/cloud/high-availability/failovers.mdx b/docs/cloud/high-availability/failovers.mdx index 5362f33348..a0a40ce7a2 100644 --- a/docs/cloud/high-availability/failovers.mdx +++ b/docs/cloud/high-availability/failovers.mdx @@ -22,36 +22,62 @@ keywords: import { ToolTipTerm, DiscoverableDisclosure, CaptionedImage } from '@site/src/components'; In case of an incident or an outage, Temporal will automatically your Namespace from the primary to the replica. -This lets Workflow Executions continue with minimal interruptions or data loss. -You can also [manually initiate failovers](/cloud/high-availability/failovers) based on your situational monitoring or for testing. +This lets in-flight Workflow Executions continue, new Workflow Executions start, and closed Workflow Executions be inspected, all with minimal interruptions or data loss. +You can also [manually trigger a failover](/cloud/high-availability/failovers) based on your own monitoring or for failover testing. Returning control from the replica to the primary is called a . After a Temporal-managed failover, Temporal automatically fails back to the original region once it is healthy. See [Returning to the primary with failbacks](#failbacks) for details on automatic and manual failback options. -## Failovers +:::tip White paper -Occasionally, a Namespace may become temporarily unavailable due to an unexpected incident. -Temporal Cloud detects these issues using regular health checks. +For an in-depth guide covering everything from why you need High Availability to setting it up in production and advanced options, read the [High Availability White Paper](https://temporal.io/pages/high-availability-white-paper). -### Health checks +::: -Temporal Cloud monitors error rates, latencies, and infrastructure problems, such as request timeouts. -If it finds unhealthy conditions where indicators exceed the allowed thresholds, Temporal automatically switches the primary to the replica. -In most cases, the replica is unaffected by the issue. -This process is known as failover. +## Automatic failover -### Automatic failovers +When an unexpected outage hits your Temporal Namespace, failing over to a healthy cloud region can prevent data loss and application interruptions. +After a failover, in-flight Workflows continue, new Workflows start, and closed Workflows can be inspected, even while the Namespace's original region is unhealthy. -Failovers prevent data loss and application interruptions. -Existing Workflows continue, and new Workflows start as the incident is addressed. +Temporal Cloud offers managed outage detection and failover to all Namespaces that use High Availability. +Temporal-managed failovers, also known as "automatic failovers," keep your Temporal Cloud Namespace available without manual intervention from you. +We aim to both detect the outage and complete a Temporal-managed failover in minutes from when the outage began, according to our stated [Recovery Time Objective (RTO)](/cloud/rto-rpo). -Temporal Cloud handles failovers automatically, ensuring continuity without manual intervention. -Once the incident is resolved, Temporal Cloud automatically performs a [failback](#failbacks), shifting Workflow Execution processing back to the original region. +After a Temporal-managed failover, your Namespace will have a replica in its original region. +Once the original region is healthy again, Temporal Cloud automatically performs a [failback](#failbacks), moving your Namespace back home. -For more control over the failover process, you can [disable automated failovers](/cloud/high-availability/failovers#disabling-temporal-initiated). +To opt-out of Temporal-managed failovers and its RTO, you can [disable automated failovers](/cloud/high-availability/failovers#disabling-temporal-initiated). +lth checks. + +### Conditions that trigger an automatic failover + +While the failover operation itself usually completes in seconds, the bulk of the Recovery Time in an outage is spent detecting the disruption and deciding to trigger a failover. See [How long does a failover take?](#failover-duration) for a detailed breakdown. + +To achieve Temporal Cloud's Recovery Time Objective (RTO) for Namespaces that have enabled High Availability and Temporal-managed failovers (also known as "automatic failovers"), Temporal Cloud runs automated Workflows that detect outages and trigger failovers. +These Workflows continuously monitor the health of Temporal Cloud in every region and every cell. + +The main conditions these Workflows check are listed below. +If any of these conditions are failing for too long, Temporal Cloud automatically triggers a failover on any Namespaces with High Availability that have a healthy replica. +Additionally, Temporal's on-call engineers may trigger a failover at their discretion, for example, if they see early signs of a regional outage. + +:::note + +The following list is meant to give Temporal Cloud users a general idea of the conditions that trigger a Temporal-managed failover. +This is not an exhaustive list of all cases, and it may change over time. + +::: + +#### Example conditions monitored + +1. Whether Temporal Cloud's services in the cell are reachable from the control plane. Unreachable services are considered "unhealthy". +2. The average latency of inbound RPC calls (excluding long-polling APIs) to Temporal services in the cell. If the average latency rises too high over a rolling time window, this condition is considered "unhealthy". +3. The percentage of inbound RPC calls that returned errors related to server health. If the percentage rises too high over a rolling time window, this condition is considered "unhealthy". +4. The average latency of calls from Temporal Cloud's services in the cell to its persistence layer. If the average latency rises too high over a rolling time window, this condition is considered "unhealthy". +5. The percentage of recent calls to the persistence layer that returned errors related to persistence health. If the percentage rises too high over a rolling time window, this condition is considered "unhealthy". + :::tip @@ -72,15 +98,15 @@ After failover, be aware of the following points: ### The failover process {#failover-process} -Temporal's automated failover process works as follows: +Temporal's failover process works as follows: -- During normal operation, the primary asynchronously copies operations and metadata to its replica, keeping them in sync. -- If the primary becomes unavailable, Temporal detects the issue through health checks. - It automatically switches to the replica, using one of its available [failover scenarios](#scenarios). -- The replica takes over the active role and becomes the primary. +1. During normal operation, the primary asynchronously copies operations and metadata to its replica, keeping them in sync. +1. A failover is triggered, either automatically by Temporal or manually by a user. +1. The replica takes over and the Namespace becomes active in the replica's cloud region. Operations continue with minimal disruption. -- When the original primary recovers, the roles can either switch back (failback, by default) or remain as they are, based on your Namespace settings. - Automatic role switching with failover and failback minimizes downtime for consistent availability. +1. If the failover was triggered by Temporal, when the original primary region recovers, Temporal triggers another failover to fail back to the Namespace's original region. + (It is possible to opt-out of this automatic fail back) +1. If the failover was triggered by a user, then the Namespace will continue as-is until a user triggers another failover. :::info @@ -89,11 +115,31 @@ This update is replicated through the Namespace metadata mechanism. ::: +### How long does a failover take? {#failover-duration} + +The time to complete a failover depends on who triggered it. + +#### User-triggered failover + +A failover that you trigger yourself happens in two stages: + +1. **The Namespace becomes active in the other region.** Temporal Cloud completes this stage within 10 seconds (internal SLO). Existing Workflow Executions resume in the new active region, and new Workflow Executions can be started. +2. **The Namespace Endpoint re-routes to the active region.** This DNS change can take a few minutes to fully propagate to all Clients and Workers. If your application has an extremely demanding Recovery Time, you can eliminate this stage by connecting through a [Regional Endpoint](/cloud/high-availability/ha-connectivity#regional-endpoint) instead of the Namespace Endpoint. Regional Endpoints require more setup, so most users should stick with the default Namespace Endpoint. + +#### Temporal-triggered failover + +A failover that Temporal triggers in response to an outage also happens in two stages: + +1. **Detecting the outage.** This is the bulk of the Recovery Time. Outages are rarely black and white; they often start as a slow degradation. Temporal continuously runs the automated health checks described in [Conditions that trigger an automatic failover](#conditions-that-trigger-an-automatic-failover). +2. **Triggering the failover commands.** Once detection completes, Temporal triggers failovers across all impacted Namespaces. + ## Failover scenarios {#scenarios} -The Temporal Cloud failover mechanism supports several modes for executing Namespace failovers. -These modes include graceful failover ("handover"), forced failover, and a hybrid mode. -The hybrid mode is Temporal Cloud’s default Namespace behavior. +A failover on Temporal Cloud always executes in a "hybrid" fashion: +1. It first attempts a "graceful" failover +2. If the graceful failover does not complete after 10 seconds, then it triggers a "forced" failover. + +This strategy balances _consistency_ and _availability_ requirements. ### Graceful failover (handover) {#graceful-failover} @@ -122,28 +168,6 @@ Events not replicated due to replication lag undergo conflict resolution upon re This mode prioritizes _availability_ over consistency. -### Hybrid failover mode {#hybrid-failover} - -While graceful failovers are preferred for consistency, they aren’t always practical. -Temporal Cloud’s hybrid failover mode (the default mode) limits the initial graceful failover attempt to 10 seconds or less. - -During this period: - -- Existing Workflows stop progress. -- Temporal Cloud returns a "Service unavailable error", which is retried by SDKs. - -If the graceful approach doesn’t resolve the issue, Temporal Cloud automatically switches to a forced failover. - -This strategy balances _consistency_ and _availability_ requirements. - -### Scenario summary - -| Failover Scenario | Characteristics | -| ---------------------------- | ------------------------------------------------------- | -| Graceful failover (handover) | Favors _consistency_ over availability. | -| Forced failover | Prioritizes _availability_ over consistency. | -| Hybrid failover mode | Balances _consistency_ and _availability_ requirements. | - ## Network partitions At any time only the primary or the replica is active. @@ -191,6 +215,14 @@ A forced failover when there is a significant replication lag has a higher likel ::: +### When to trigger a manual failover {#when-to-trigger} + +Most Namespaces with High Availability are well-served by Temporal-managed failovers. The cases where a manual failover is warranted are: + +- **Testing failover or migrating to a new region.** A manual failover is the standard way to exercise your failover process with your Clients and Workers, or to move a Namespace to a different region. +- **An outage that affects only your systems.** If an outage is contained to your application, Workers, or other infrastructure — and Temporal Cloud is not affected — Temporal will not initiate a failover on your behalf. Detect the outage with your own monitoring and trigger a failover yourself. +- **Failing over more aggressively during a regional outage.** Even with Temporal-managed failovers enabled, you can still trigger a failover yourself if you detect a regional outage before Temporal does. Whichever failover happens first takes effect, and the later one is a no-op, so a user-triggered failover does not conflict with Temporal's automatic failover. This can help you achieve a lower Recovery Time when every minute matters. + ### Trigger the failover {#manual-failovers} You can trigger a failover manually using the Temporal Cloud Web UI, the tcld CLI, or the Cloud Ops API, depending on your preference and setup. diff --git a/docs/cloud/high-availability/ha-connectivity.mdx b/docs/cloud/high-availability/ha-connectivity.mdx index 72b6dd3577..6fbed41466 100644 --- a/docs/cloud/high-availability/ha-connectivity.mdx +++ b/docs/cloud/high-availability/ha-connectivity.mdx @@ -14,6 +14,12 @@ This page covers: - How to choose between the Namespace Endpoint and a Regional Endpoint for a Namespace with High Availability features. - How to configure PrivateLink so that failover remains transparent to Workers on private networks. +:::tip White paper + +For an in-depth guide covering everything from why you need High Availability to setting it up in production and advanced options, read the [High Availability White Paper](https://temporal.io/pages/high-availability-white-paper). + +::: + ## How to choose an endpoint for a Namespace with High Availability features Temporal Cloud exposes two kinds of gRPC endpoints for a Namespace. diff --git a/docs/cloud/high-availability/monitoring.mdx b/docs/cloud/high-availability/monitoring.mdx index 4e1b79b5ed..0a1abb0efa 100644 --- a/docs/cloud/high-availability/monitoring.mdx +++ b/docs/cloud/high-availability/monitoring.mdx @@ -26,6 +26,12 @@ import { ToolTipTerm } from '@site/src/components'; Temporal Cloud offers several ways for you to track the health and performance of your [High Availability](/cloud/high-availability) namespaces. +:::tip White paper + +For an in-depth guide covering everything from why you need High Availability to setting it up in production and advanced options, read the [High Availability White Paper](https://temporal.io/pages/high-availability-white-paper). + +::: + ## Replication status You can monitor your replica status with the Temporal Cloud UI. If the replica is unhealthy, Temporal Cloud disables the diff --git a/docs/cloud/rto-rpo.mdx b/docs/cloud/rto-rpo.mdx index ecb12e35c8..d3118d425e 100644 --- a/docs/cloud/rto-rpo.mdx +++ b/docs/cloud/rto-rpo.mdx @@ -1,8 +1,8 @@ --- id: rpo-rto -title: RPO and RTO -sidebar_label: RPO and RTO -description: Understand the Recovery Point Objective (RPO) and Recovery Time Objective (RTO) in Temporal Cloud. +title: Outages and Recovery Objectives (RTO / RPO) +sidebar_label: Outages and Recovery Objectives (RTO / RPO) +description: Understand the types of outages Temporal Cloud is designed to handle, and the Recovery Point Objective (RPO) and Recovery Time Objective (RTO) for each. slug: /cloud/rpo-rto toc_max_heading_level: 4 keywords: @@ -11,6 +11,7 @@ keywords: - RTO - Recovery Point Objective - Recovery Time Objective + - outages tags: - Recovery Point Objective - Recovery Time Objective @@ -21,38 +22,146 @@ import { ToolTipTerm } from '@site/src/components'; When a cloud outage disrupts a Namespace, Temporal Cloud takes measures to maintain the Namespace's availability and data durability. The time it takes to recover from the outage is called the "recovery time." The amount of data (event histories) lost is called the "recovery point." A durable system should have a low recovery time and recovery point. -To help users plan for keeping critical Workflows available during a cloud outage, Temporal Cloud publishes goals for the recovery time and recovery point for each kind of outage. These goals are called the Recovery Time Objective (RTO) and Recovery Point Objective (RPO). These objectives are complementary to Temporal Cloud's [Service Level Agreement (SLA)](/cloud/sla). - -To achieve the lowest RPO and RTO, Temporal Cloud offers [High Availability](/cloud/high-availability) features that keep Workflows operational with minimal downtime. When High Availability is enabled on a Namespace, the user chooses a region to place a "replica" that will take over in the event of a failure. The location of the replica determines the type of replication used and the type of outages that can be handled. Multi-region Replication is when the active and replica are in different regions on the same cloud (e.g., AWS us-east-1 and AWS us-west-2). Multi-cloud Replication is when the active and replica are in different clouds (e.g., AWS and GCP). Same-region Replication is when the active and replica are in the same region. Temporal always places the active and replica in different [cells](/cloud/overview#cell-based-infrastructure). - -As Workflows progress in the active region, history events are asynchronously replicated to the replica. -Because replication is asynchronous, High Availability does not impact the latency or throughput of Workflow Executions in the active region. -If an outage hits the active region or cell, Temporal Cloud will fail over to the replica so that existing Workflow Executions will continue to run and new Workflow Executions can be started. - -The Recovery Point Objective and Recovery Time Objective for Temporal Cloud depend on the type of outage and which [High Availability](/cloud/high-availability) feature your Namespace has enabled. Temporal Cloud can only set an RPO and RTO for cases where it has the ability to mitigate the outage. Therefore, the below RPOs and RTOs apply to Namespaces that have the corresponding type of replication and have enabled Temporal-initiated failovers, which comes enabled by default. - -1. **Availability zone outage**: - 1. _Applicable Namespaces:_ All Namespaces - 2. _Goals:_ Zero RPO and near-zero RTO - 3. _More details:_ Historically, these have been the most common type of outage in the cloud. Temporal Cloud replicates every Namespace across three availability zones. The failure of a single availability zone is handled automatically by Temporal Cloud behind the scenes, with no potential for data loss, and little-to-no observable downtime to the end user. -2. **Cell outage**: - 1. _Applicable Namespaces:_ Namespaces with Same-region Replication, Multi-region Replication, or Multi-cloud Replication - 2. _Goals:_ 1-minute RPO and 20-minute RTO - 3. _More details:_ Temporal Cloud runs on a [cell architecture](/cloud/sla). Each cell contains the software and services necessary to host a Namespace. While unlikely, it's possible for a cell to experience a disruption due to uncaught software bugs or sub-component failures (e.g., an outage in the underlying database). -3. **Regional outage**: - 1. _Applicable Namespaces:_ Namespaces with Multi-region Replication or Multi-cloud Replication - 2. _Goals:_ 1-minute RPO and 20-minute RTO - 3. _More details:_ On [rare occasions](https://temporal.io/blog/how-devs-kept-running-during-the-aws-us-east-1-oct-20-2025), an entire region within a cloud provider will be degraded. Since Namespaces depend on the cloud provider's infrastructure, Temporal Cloud is not immune to these outages. -4. **Cloud-wide outage**: - 1. _Applicable Namespaces:_ Namespaces with Multi-cloud Replication - 2. _Goals:_ 1-minute RPO and 20-minute RTO - 3. _More details:_ An entire cloud provider has an outage across most or all regions. Since cloud providers strive to keep cloud regions de-coupled, these are the rarest outages of all. Still, they [have happened](https://status.cloud.google.com/incidents/ow5i3PPK96RduMcb1SsW) in the past. +To help you plan for keeping critical Workflows available during a cloud outage, Temporal Cloud publishes goals for the recovery time and recovery point for each kind of outage. These goals are called the Recovery Time Objective (RTO) and Recovery Point Objective (RPO). These objectives are complementary to Temporal Cloud's [Service Level Agreement (SLA)](/cloud/sla). + +:::tip White paper + +For an in-depth guide covering everything from why you need High Availability to setting it up in production and advanced options, read the [High Availability White Paper](https://temporal.io/pages/high-availability-white-paper). + +::: + +## Types of outages Temporal Cloud designs around + +Temporal Cloud is engineered to withstand four broad categories of cloud outages. The categories are listed below in order of how commonly they occur in the real world. For each category, Temporal has experienced the outage in production, and the corresponding Temporal Cloud features have successfully mitigated the impact for real customer Namespaces. + +### Availability Zone outage + +An [Availability Zone](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones) (AZ) is akin to an isolated datacenter managed by a cloud hyperscaler, with independent power, networking, and cooling infrastructure. Each cloud region contains multiple AZs, and an individual AZ can fail due to events such as hardware failure, power loss, or a localized network partition. + +Historically, AZ outages are the most common type of outage in the cloud, and Temporal Cloud has weathered many of them transparently to our customers. + +**Blast Radius:** A single Availability Zone within a single cloud region. Because every Namespace's components are spread across at least three AZs, the blast radius to Temporal Cloud users is typically zero — Namespaces stay operational with little to no downtime. However, the outage will take out any Workers the user is running in that AZ. We recommend spreading Workers across multiple AZs to mitigate this. + +**Temporal Cloud feature to mitigate this outage:** Every Namespace is automatically spread across at least three Availability Zones, and any Namespace can handle a single AZ failure without disruption to end-user Temporal operations. [High Availability](/cloud/high-availability) features are _not_ required to keep Temporal Cloud operations running through an AZ outage. + +**SLA inclusion:** Included in the [SLA](/cloud/sla) calculation. Any errors during an AZ outage count toward SLA credits, since AZ resilience is within Temporal's responsibility. + +If two AZs fail simultaneously, Temporal Cloud treats the event as a [Cloud Region outage](#cloud-region-outage). In that case, Namespaces in the region may be impacted, including those using [Same-region Replication](/cloud/high-availability#same-region-replication). + +:::note + +When an AZ fails, Temporal may also trigger a failover on Namespaces that have High Availability enabled, as a precaution in case the outage scope expands. You can opt out of this behavior by [disabling Temporal-managed failovers](cloud/high-availability/failovers#disabling-temporal-initiated) on the Namespace. + +::: + +#### RTO and RPO + +When using Temporal Cloud (no additional features required): + +- **Near-zero RTO.** When a single AZ fails, the remaining two AZs continue serving requests without a failover, so end users see little to no disruption. +- **Zero RPO.** Writes to Workflow state are synchronously replicated across all three AZs before being acknowledged back to the Client, so an AZ failure cannot cause data loss. + +### Cell outage + +Temporal Cloud runs on a [cell architecture](https://docs.aws.amazon.com/wellarchitected/latest/reducing-scope-of-impact-with-cell-based-architecture/what-is-a-cell-based-architecture.html). Each cell contains the software and services necessary to host a Namespace, and components within a cell are distributed across at least three Availability Zones. Cells provide a strong unit of isolation: a problem inside one cell does not propagate to other cells. + +**Example causes:** failure of a sub-component within the cell (for example, an individual database becoming unavailable) or a software bug introduced in a new deploy to the cell. + +**Blast Radius:** One cell--and the Namespaces within that cell--within a single region. Even though your Workers will remain healthy, they will not be able to process Workflows because the Namespace is down. + +**Temporal Cloud feature to mitigate this outage:** [Multi-region Replication](/cloud/high-availability) (GA) and [Multi-cloud Replication](/cloud/high-availability) (GA) replicate a Namespace into another cell in a different region or different cloud provider. [Same-region Replication](/cloud/high-availability) (Preview) replicates a Namespace into another cell within the same region. When any of these features enabled for a namespace, an outage that disrupts a single cell can be mitigated by failing the Namespace over to its replica. + +**SLA inclusion:** Included in the [SLA](/cloud/sla) calculation. Any errors during a cell outage count toward SLA credits, since mitigating cell outages is within Temporal's responsibility. + +Cell-level disruptions occur from time to time, and Temporal's replication and failover tooling has restored affected Namespaces in real-world incidents. + +#### RTO and RPO + +When using Same-region Replication, Multi-region Replication, or Multi-cloud Replication for Temporal-managed failover: + +- **RTO under 20 minutes.** Temporal detects the disruption and fails the Namespace over to its replica cell. +- **RPO under 1 minute.** Asynchronous replication keeps the replica close to the active cell. + +Even though the RPO target is under 1 minute, data is virtually never "lost" thanks to Temporal's built-in Recovery and Conflict Resolution process, which reconciles state between the active and replica when the outage is over. + +### Cloud Region outage + +A cloud region as a whole can become degraded, with effects that span beyond any single cell or Availability Zone. + +**Example causes:** failure of a key cloud service in the region causing cascading failures, two or more Availability Zones failing simultaneously, or network partitions between the region and other regions. + +**Blast Radius:** All Namespaces and Workers within a single cloud region are potentially affected. Namespaces and Workers in other regions of the same cloud — and in other clouds — are unaffected. + +**Temporal Cloud feature to mitigate this outage:** [Multi-region Replication](/cloud/high-availability) and [Multi-cloud Replication](/cloud/high-availability) place the replica outside the affected region, so a Namespace can fail over and continue serving Workflows. Same-region Replication does not protect against a Cloud Region outage, since the replica resides in the same region. + +**SLA inclusion:** Included in the [SLA](/cloud/sla) calculation only for Namespaces that have Multi-region Replication or Multi-cloud Replication enabled with Temporal-managed failovers — in those cases, Temporal can mitigate the outage. For Namespaces without these features, a Cloud Region outage is excluded from the SLA calculation, as it is beyond Temporal's control to mitigate. + +If two or more regions in the same cloud provider experience an outage simultaneously, Temporal Cloud treats the event as a [Cloud-wide outage](#cloud-wide-outage). + +Regional outages are less common than cell or AZ outages, but they happen. During the [AWS us-east-1 incident on October 20, 2025](https://temporal.io/blog/how-devs-kept-running-during-the-aws-us-east-1-oct-20-2025), Temporal Cloud's regional failover kept customer Namespaces running. + +#### RTO and RPO + +When using Multi-region Replication or Multi-cloud Replication for Temporal-managed failover: + +- **RTO under 20 minutes.** Temporal detects the regional disruption and fails the Namespace over to its replica in another region. +- **RPO under 1 minute.** Asynchronous replication keeps the replica close to the active region. + +Even though the RPO target is under 1 minute, data is virtually never "lost" thanks to Temporal's built-in Recovery and Conflict Resolution process, which reconciles state between the active and replica when a failover occurs. + +### Cloud-wide outage + +On rare occasions, an issue affects two or more regions of a single cloud provider at once. Any simultaneous outage of two or more regions in the same cloud provider is treated as a cloud-wide outage. + +**Example causes:** a software bug rolled out to every region of a cloud provider that triggers cascading failures across the provider's infrastructure, or two or more regions in the same cloud experiencing independent regional outages at the same time. + +**Blast Radius:** Most or all regions of a single cloud provider. Every Namespace and every Worker hosted in that cloud is potentially affected. + +**Temporal Cloud feature to mitigate this outage:** [Multi-cloud Replication](/cloud/high-availability) places the replica in a different cloud provider entirely, so the Namespace can fail over even when an entire cloud provider goes down. + +**SLA inclusion:** Included in the [SLA](/cloud/sla) calculation only for Namespaces that have Multi-cloud Replication enabled with Temporal-managed failovers — in those cases, Temporal can mitigate the outage. For Namespaces without this feature, a cloud-wide outage is excluded from the SLA calculation, as it is beyond Temporal's control to mitigate. + +Cloud-wide outages are the rarest category, but they [have occurred](https://status.cloud.google.com/incidents/ow5i3PPK96RduMcb1SsW). Multi-cloud Replication is designed to keep Namespaces running through such events. + +#### RTO and RPO + +When using Multi-cloud Replication for Temporal-managed failover: + +- **RTO under 20 minutes.** Temporal detects the cloud-wide disruption and fails the Namespace over to its replica in a different cloud provider. +- **RPO under 1 minute.** Asynchronous replication keeps the replica close to the active region, even across cloud providers. + +Even though the RPO target is under 1 minute, data is virtually never "lost" thanks to Temporal's built-in Recovery and Conflict Resolution process, which reconciles state between the active and replica when a failover occurs. + +## How High Availability replication works + +To achieve the lowest RPO and RTO, Temporal Cloud offers [High Availability](/cloud/high-availability) features that keep Workflows operational with minimal downtime. When High Availability is enabled on a Namespace, the user chooses a region to place a "replica" that will take over in the event of a failure. The location of the replica determines the type of replication used and the categories of outage it can handle: + +- **Multi-region Replication** places the active and replica in different regions on the same cloud (for example, AWS us-east-1 and AWS us-west-2). +- **Multi-cloud Replication** places the active and replica in different cloud providers (for example, AWS and GCP). +- **Same-region Replication** (Preview) places the active and replica in the same region. + +Temporal always places the active and replica in different [cells](/cloud/overview#cell-based-infrastructure). + +As Workflows progress in the active region, history events are asynchronously replicated to the replica. Because replication is asynchronous, High Availability does not impact the latency or throughput of Workflow Executions in the active region. If an outage hits the active region or cell, Temporal Cloud will fail over to the replica so that existing Workflow Executions will continue to run and new Workflow Executions can be started. + +## Explaining Temporal Cloud's RTO and RPO + +The Recovery Point Objective and Recovery Time Objective for Temporal Cloud depend on the type of outage and which [High Availability](/cloud/high-availability) feature your Namespace has enabled. Temporal Cloud can only set an RPO and RTO for cases where it has the ability to mitigate the outage. Therefore, the published RPOs and RTOs apply to Namespaces that have the corresponding type of replication and have enabled Temporal-initiated failovers, which comes enabled by default. + +### Summary table + +| Outage type | Applicable Namespaces | RPO | RTO | +| ---------------------- | ------------------------------------------------------------------------------ | -------------- | ---------------- | +| Availability Zone outage | All Namespaces | Zero | Near-zero | +| Cell outage | Namespaces with Same-region, Multi-region, or Multi-cloud Replication | Under 1 minute | Under 20 minutes | +| Cloud Region outage | Namespaces with Multi-region or Multi-cloud Replication | Under 1 minute | Under 20 minutes | +| Cloud-wide outage | Namespaces with Multi-cloud Replication | Under 1 minute | Under 20 minutes | Notes: - The above goals are only applicable to Namespaces that have enabled Temporal-initiated failovers, which comes enabled by default. Temporal-initiated failovers are initiated by Temporal's tooling and/or on-call engineers without user action. Users can always initiate a failover on their Namespace, even when Temporal-initiated failovers are enabled. In an outage, a user-initiated failover will not cancel out or accidentally reverse a Temporal-initiated failover. -:::note +:::tip Temporal highly recommends keeping Temporal-initiated failovers enabled. When Temporal-initiated failovers are _disabled,_ Temporal Cloud cannot set an RPO and RTO for that Namespace, because it cannot control when or if the user will trigger a failover. @@ -64,8 +173,17 @@ Temporal highly recommends keeping Temporal-initiated failovers enabled. When Te - All Namespaces are backed up every 4 hours. If an outage causes data loss on a Namespace that was not protected by High Availability, then Temporal will use the backup to restore as much data as feasible. +- Temporal has internal goals and measurements for Recovery Time and Recovery Point, but does not publish the achieved Recovery Time and Recovery Point for each incident. + +### Explaining the RPO + +:::note Temporal's Recovery Point is different from a traditional Recovery Point -## Minimizing the Recovery Point +In a traditional database, data within the Recovery Point window may be permanently lost during a failover. In Temporal Cloud, that data is not lost. Cloud data stores are engineered for extreme durability (commonly 99.999999999%, or "11 nines"), so any data acknowledged by Temporal Cloud is durably persisted. After the outage resolves, Temporal's Recovery and Conflict Resolution process automatically syncs that data back into the Namespace. + +The Recovery Point Objective therefore reflects the maximum data that may be temporarily unavailable in the replica at the moment of failover, not the maximum data that could be permanently lost. + +::: Temporal has put extensive work into tools and processes that minimize the recovery point and achieve its RPO for Temporal-initiated failovers, including: @@ -83,7 +201,20 @@ Temporal recommends monitoring the replication lag and alerting should it rise t ::: -## Minimizing the Recovery Time +### Explaining the RTO + +The Recovery Time for a given incident is measured from the moment the incident begins to cause abnormal Namespace operation — for example, when unavailability or error rates rise above an acceptable level — to the moment the Namespace is restored to full functionality. + +For most incidents, the vast majority of the Recovery Time is spent detecting the incident, determining the affected boundary (a single cell, a region, or an entire cloud), and deciding to fail Namespaces over to their replicas. The actual time to complete the failover is usually a very small piece of the Recovery Time. + +A Temporal-triggered failover unfolds in two stages: + +1. **Detection.** Outages are rarely black and white; they often begin as a slow degradation. Temporal's automated health checks continuously watch every cell and region. +2. **Failover.** Once detection completes, Temporal triggers failovers across all impacted Namespaces. + +This Recovery Time covers only the Temporal Namespace. Your application's overall Recovery Time also depends on having enough healthy Workers that can reach the Namespace and process Workflows. Maintaining sufficient Worker capacity that can reach the replica region (or replica cloud) during a failover is your responsibility. + +#### How Temporal achieves a low Recovery Time Temporal has put extensive work into tools and processes that minimize the recovery time and achieve its RTO for Temporal-initiated failovers, including: @@ -97,6 +228,8 @@ Temporal has put extensive work into tools and processes that minimize the recov - Expert engineers on-call 24/7 monitoring Temporal Cloud Namespaces and ready to assist should an outage occur. +#### Tips for a lower Recovery Time + To achieve the lowest possible recovery times, Temporal recommends that you: - Keep Temporal-initiated failovers enabled on your Namespace (the default) @@ -112,8 +245,7 @@ Users can trigger manual failovers on their Namespaces even if Temporal-initiate - Even if you have robust tooling to detect an outage and trigger a failover, leaving Temporal-initiated failovers enabled provides a "safety net" in case your automation misses an outage. It also gives Temporal leeway to preemptively fail over your Namespace if we detect that it may be disrupted soon, e.g., by a rolling failure that has impacted other Namespaces but not yours, yet. - -## Understanding Temporal's RTO vs. SLA +#### Comparing RTO and SLA Temporal has both a Recovery Time Objective (RTO) and a Service Level Agreement (SLA). They serve complementary purposes and apply in different situations.