Skip to content

Commit 0b83909

Browse files
Merge branch 'main' into maplexu/AI-141-langsmith-docs
2 parents fd41318 + 4d63e6b commit 0b83909

10 files changed

Lines changed: 232 additions & 68 deletions

File tree

docs/cloud/high-availability/ha-connectivity.mdx

Lines changed: 94 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,84 @@ id: ha-connectivity
33
title: Connectivity for High Availability
44
sidebar_label: Connectivity for High Availability
55
slug: /cloud/high-availability/ha-connectivity
6-
description: How to use private network connectivity with Temporal Cloud HA features
6+
description: How to choose endpoints and configure private network connectivity for Namespaces with Temporal Cloud High Availability features.
77
---
88

99
import { CaptionedImage, JsonTable } from '@site/src/components';
1010

11-
:::tip Namespaces with High Availability features and private connectivity
11+
A Namespace with High Availability features spans two regions, and the endpoint your Workers and Clients connect through determines how they behave before, during, and after a failover.
12+
This page covers:
1213

13-
Proper networking configuration is required for failover to be transparent to clients and Workers when using AWS PrivateLink or GCP Private Service Connect.
14+
- How to choose between the Namespace Endpoint and a Regional Endpoint for a Namespace with High Availability features.
15+
- How to configure PrivateLink so that failover remains transparent to Workers on private networks.
1416

15-
This page covers single-cloud HA (both replicas on AWS, or both on GCP) and multi-cloud HA (one replica on AWS, one on GCP).
17+
## How to choose an endpoint for a Namespace with High Availability features
18+
19+
Temporal Cloud exposes two kinds of gRPC endpoints for a Namespace.
20+
See [How to access a Namespace](/cloud/namespaces#access-namespaces) for the general definitions; this section focuses on how each behaves with replication and failover.
21+
22+
### Namespace Endpoint (recommended)
23+
24+
Format: `<namespace>.<account>.tmprl.cloud:7233`
25+
26+
The Namespace Endpoint always connects to whichever region is currently active.
27+
Under the hood, it is a CNAME that points at the active region's Regional Endpoint.
28+
When Temporal Cloud fails the Namespace over, it updates the CNAME to point at the new active region.
29+
The DNS <a href="https://en.wikipedia.org/wiki/Time_to_live">TTL</a> is 15 seconds, so Clients converge within about 30 seconds with no configuration change on your side.
30+
31+
Use the Namespace Endpoint unless you have a specific reason to pin traffic to a region.
32+
33+
### Regional Endpoint
34+
35+
Format: `<cloud>-<region>.region.tmprl.cloud:7233` (for example, `aws-us-west-2.region.tmprl.cloud` or `gcp-us-central1.region.tmprl.cloud`).
36+
See [regions](/cloud/regions) for the full list.
37+
38+
A Regional Endpoint is shared across every Namespace that is active or replicated in that region.
39+
Unlike the Namespace Endpoint, a Regional Endpoint stays pinned to the region in its name — if that region holds the passive replica of your Namespace, the Regional Endpoint connects to the passive replica.
40+
41+
Use a Regional Endpoint only when you need explicit control over which replica a Client or Worker reaches.
42+
43+
Trade-offs to consider:
44+
45+
- **Faster recovery.** A Worker connecting through a Regional Endpoint skips the DNS step that Clients on the Namespace Endpoint wait for during a failover. This removes the ~30-second DNS convergence window from the recovery path, which is useful for Workloads that must minimize [Recovery Time](/cloud/rpo-rto) at all costs.
46+
- **You are responsible for regional coverage.** A Worker using the Regional Endpoint of a region cannot reach the Namespace if that region is in an outage. To stay available through a failover, you must run Workers that use the **replica** region's Regional Endpoint — Workers pointed only at the outage region's Regional Endpoint will not reconnect automatically.
47+
48+
When authenticating with mTLS, set the Client's `server_name` / `serverNameOverride` config equal to the Namespace Endpoint.
49+
This overrides the SNI that the Client will expect during the TLS Handshake with Temporal Cloud.
50+
The Regional Endpoint forwards the request to your Namespace, so the Client must expect the Namespace's certificate during the TLS handshake.
51+
52+
For example, in Typescript, the Client's config would be set like this:
53+
54+
```typescript
55+
await Connection.connect({
56+
address: 'aws-us-east-1.region.tmprl.cloud:7233',
57+
tls: {
58+
serverNameOverride: 'my-namespace.my-account.tmprl.cloud',
59+
clientCertPair: { crt: clientCert, key: clientKey },
60+
},
61+
...
62+
});
63+
```
64+
65+
### How endpoints route on failover
66+
67+
Consider a Namespace replicated across `us-east-1` (initially active) and `us-west-2` (initially the replica), with a failover that swaps the two.
68+
69+
| Client connects via | Before failover | After failover |
70+
| ------------------------------------------- | --------------- | ----------------------- |
71+
| Namespace Endpoint | `us-east-1` | `us-west-2` (automatic) |
72+
| Regional Endpoint `aws-us-east-1.region...` | `us-east-1` | `us-east-1` |
73+
| Regional Endpoint `aws-us-west-2.region...` | `us-west-2` | `us-west-2` |
74+
75+
The Namespace Endpoint moves with the active region via an updated CNAME — no Client changes required.
76+
The Regional Endpoints do not change their targets on failover: each continues to route to the replica that lives in its region.
77+
78+
## How to use PrivateLink with High Availability features
79+
80+
:::tip
81+
82+
Proper networking configuration is required for failover to be transparent to Clients and Workers when using PrivateLink.
83+
This section describes how to configure routing for Namespaces with High Availability features on AWS PrivateLink.
1684

1785
:::
1886

@@ -32,37 +100,37 @@ Namespace DNS records have a 15-second TTL. Clients should converge to the new r
32100

33101
For private connectivity, your job is to make sure that:
34102

35-
1. Both regions resolve to the correct private endpoint inside your network — not the public internet.
36-
2. Your Workers have a network path to whichever region becomes active.
103+
- Override the Regional Endpoint's DNS zone to resolve to a VPC Endpoint.
104+
- Ensure network connectivity between the two regions.
37105

38106
## Single-cloud HA on AWS PrivateLink
39107

40-
This is the most common setup: both replicas live in AWS regions, and Workers connect via AWS PrivateLink.
108+
### How Namespace DNS records work with PrivateLink
41109

42110
When using PrivateLink, you connect to Temporal Cloud through a VPC Endpoint, which uses addresses local to your network.
43-
Temporal treats each `region.tmprl.cloud` zone as a separate zone, so you override resolution per region.
111+
Temporal treats each `region.<tmprl_domain>` as a separate zone.
112+
This setup allows you to override the default zone, ensuring that traffic is routed internally for the regions you're using.
44113

45-
Before failover, with the active region being `aws-us-west-2`:
114+
A Namespace's active region is reflected in the target of the Namespace Endpoint's CNAME record.
115+
For example, if the active region of a Namespace is AWS us-east-1, the DNS configuration would look like this:
46116

47-
| Record name | Record type | Value |
48-
| ----------------------------------- | ----------- | -------------------------------- |
49-
| ha-namespace.account-id.tmprl.cloud | CNAME | aws-us-west-2.region.tmprl.cloud |
117+
| ha-namespace.account-id.tmprl.cloud | CNAME | aws-us-east-1.region.tmprl.cloud |
118+
| ----------------------------------- | ----- | -------------------------------- |
50119

51-
After a failover to `aws-us-east-1`, Temporal Cloud rewrites the CNAME:
120+
After a failover, the CNAME record is updated to point to the failover region, for example:
52121

53-
| Record name | Record type | Value |
54-
| ----------------------------------- | ----------- | -------------------------------- |
55-
| ha-namespace.account-id.tmprl.cloud | CNAME | aws-us-east-1.region.tmprl.cloud |
122+
| ha-namespace.account-id.tmprl.cloud | CNAME | aws-us-west-2.region.tmprl.cloud |
123+
| ----------------------------------- | ----- | -------------------------------- |
56124

57-
The Temporal-managed CNAME changed from us-west-2 to us-east-1 — your private DNS does not need to change.
125+
The Temporal domain did not change, but the CNAME updated from us-east-1 to us-west-2.
58126

59127
<CaptionedImage
60128
src="/img/cloud/high-availability/private-link.png"
61129
title="Customer side solution example"
62130
zoom="true"
63131
/>
64132

65-
### Setting up the DNS override (AWS)
133+
### How to set up the DNS override
66134

67135
In AWS, use a Route 53 private hosted zone for `region.tmprl.cloud` to override resolution per region:
68136

@@ -114,24 +182,18 @@ If you run Workers on Alpine and use multi-cloud HA, either:
114182

115183
:::
116184

117-
## Test failover before you depend on it
118-
119-
Failover is the only thing High Availability features exist to do — and DNS, cross-region or cross-cloud reachability, and Connectivity Rule coverage are exactly the kinds of configuration that look correct on paper and break under failover. Test it in a non-production Namespace first.
185+
To set up the DNS override, configure specific regions to target the internal VPC Endpoint IP addresses.
186+
For example, you might set `aws-us-west-1.region.tmprl.cloud` to target `192.168.1.2`.
187+
In AWS, this can be done using a Route 53 private hosted zone for `region.tmprl.cloud`.
188+
Link that private zone to the VPCs you use for Workers.
120189

121190
A reasonable validation plan:
122191

123-
1. Set up the HA Namespace and the private connectivity for both regions, including all DNS overrides.
124-
2. Run Workers continuously in **both** regions (or arrange cross-region connectivity).
125-
3. Trigger a manual failover from the Web UI or `tcld` and verify:
126-
- DNS for `<ns>.<account>.tmprl.cloud` resolves to the new region within ~30 seconds.
127-
- Workers in both regions are picking up tasks.
128-
- SDK clients connect successfully (no `Name resolution failed`, `connection reset by peer`, or `context deadline exceeded` errors).
129-
4. Trigger a failback to the original region and verify the same.
130-
5. For multi-cloud HA, repeat with each cloud as the active replica, including from base images (Alpine, distroless) you actually use in production.
131-
132-
If a real failover finds a configuration gap that wasn't tested, recovery typically requires changes on the client side that are hard to make under pressure.
192+
Consider how you'll configure Workers for this setup.
193+
You can either have Workers run in both regions continuously or establish connectivity between regions using Transit Gateway or VPC Peering.
194+
Either approach ensures Workers can access the newly activated region once failover occurs.
133195

134-
## Available regions, PrivateLink endpoints, and DNS record overrides
196+
### Available regions, PrivateLink endpoints, and DNS record overrides
135197

136198
:::caution
137199

docs/cloud/migrate/automated.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ Temporal will generate the endpoint-id and initiate the migration. During this p
289289
while the cloud Namespace becomes passive. Workflows are replicated from the self-hosted Namespace to the cloud Namespace. Once the
290290
cloud Namespace has fully synced with self-hosted Namespace, migration is ready for handover.
291291
292+
:::note Billing
293+
294+
Billing for the cloud Namespace does not begin until the migration is [confirmed](#confirm-complete).
295+
296+
:::
297+
292298
The following [command](https://pkg.go.dev/github.com/temporalio/tcld#readme-start-a-migration) is used to start the
293299
migration:
294300
@@ -341,7 +347,7 @@ Use the following checklist prior to finalizing the migration:
341347
lead to unexpected symptoms and optimizations.
342348
- Know how to reach out to your Temporal Solutions Architect (SA) and Account Executive (AE) for assistance.
343349

344-
### Confirm complete
350+
### Confirm complete {#confirm-complete}
345351

346352
Once a Namespace has been transferred to the cloud and validated, the migration will be completed. Note that this step
347353
is final and may not be undone. Once performed, Workflow replication from the cloud Namespace to the self-hosted server

docs/develop/go/best-practices/data-handling/external-storage.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ description: Offload large payloads to external storage using the claim check pa
1313

1414
:::info Release, stability, and dependency info
1515

16-
External Storage is in [Pre-Release](/evaluate/development-production-features/release-stages#pre-release). APIs and
17-
configuration may change before the stable release. Join the
16+
External Storage is in [Public Preview](/evaluate/development-production-features/release-stages#public-preview). APIs and
17+
configuration may change before General Availability. Join the
1818
[#large-payloads Slack channel](https://temporalio.slack.com/archives/C09VA2DE15Y) to provide feedback or ask for help.
1919

2020
:::
@@ -34,6 +34,7 @@ The Go SDK includes an S3 storage driver. Follow these steps to set it up:
3434

3535
- An Amazon S3 bucket that you have read and write access to. Refer to [lifecycle management](/external-storage#lifecycle)
3636
to ensure that your payloads remain available for the entire lifetime of the Workflow.
37+
- The S3 driver has been validated with single-region buckets. Multi-region configurations such as AWS Multi-Region Access Points (MRAP) have not been validated.
3738
- Install the S3 driver module and its dependencies: `go get go.temporal.io/sdk/contrib/aws/s3driver go.temporal.io/sdk/contrib/aws/s3driver/awssdkv2 github.com/aws/aws-sdk-go-v2/config github.com/aws/aws-sdk-go-v2/service/s3`
3839

3940
### Procedure
@@ -87,6 +88,8 @@ w := worker.New(c, "my-task-queue", worker.Options{})
8788
All Workflows and Activities running on the Worker use the storage driver automatically without changes to your
8889
business logic. The driver uploads and downloads payloads concurrently and validates payload integrity on retrieve.
8990

91+
The S3 driver includes diagnostic metadata, such as the AWS region, in error messages to help troubleshoot storage failures.
92+
9093
## Implement a custom storage driver
9194

9295
If you need a storage backend other than what the built-in drivers allow, you can implement your own storage driver.

0 commit comments

Comments
 (0)