diff --git a/docs/best-practices/multi-tenant-patterns.mdx b/docs/best-practices/multi-tenant-patterns.mdx index 417808b4b9..80212e6f21 100644 --- a/docs/best-practices/multi-tenant-patterns.mdx +++ b/docs/best-practices/multi-tenant-patterns.mdx @@ -123,7 +123,7 @@ need its own service accounts, API keys, dashboards, or rate limits. If that is [Namespace best practices](/best-practices/managing-namespace) before committing to Namespace-per-tenant isolation. - + ### Pattern comparison @@ -336,7 +336,7 @@ TenantId = 'customer-123' AND ExecutionStatus = 'Running' ## Related resources - + diff --git a/docs/best-practices/pre-production-testing.mdx b/docs/best-practices/pre-production-testing.mdx index bfc05c4831..2c71adbf46 100644 --- a/docs/best-practices/pre-production-testing.mdx +++ b/docs/best-practices/pre-production-testing.mdx @@ -228,7 +228,7 @@ Intentionally break or degrade downstream dependencies used by Activities: - [Workflow Versioning Strategies - Developer Corner](https://community.temporal.io/t/workflow-versioning-strategies/6911) - [Worker Versioning](/production-deployment/worker-deployments/worker-versioning) -- [Replay Testing](/evaluate/development-production-features/testing-suite) +- Replay Testing: see SDK documentation for details **What to test** @@ -251,7 +251,7 @@ Intentionally break or degrade downstream dependencies used by Activities: - [Workflow Versioning Strategies - Developer Corner](https://community.temporal.io/t/workflow-versioning-strategies/6911) - [Worker Versioning](/production-deployment/worker-deployments/worker-versioning) -- [Replay Testing](/evaluate/development-production-features/testing-suite) +- Replay Testing: see SDK documentation for details **What to test** diff --git a/docs/cli/setup-cli.mdx b/docs/cli/setup-cli.mdx index 114162f812..b7d8631300 100644 --- a/docs/cli/setup-cli.mdx +++ b/docs/cli/setup-cli.mdx @@ -92,7 +92,7 @@ extension using the following command: :::tip Support, stability, and dependency info -The Temporal Cloud extension is in [Public Preview](/evaluate/development-production-features/release-stages#public-preview). +The Temporal Cloud extension is in [Public Preview](/evaluate/product-release-stages#public-preview). APIs and configuration may change before the stable release. ::: diff --git a/docs/cloud/get-started/namespaces.mdx b/docs/cloud/get-started/namespaces.mdx index 03167ef896..ab404cc3e8 100644 --- a/docs/cloud/get-started/namespaces.mdx +++ b/docs/cloud/get-started/namespaces.mdx @@ -274,7 +274,7 @@ key and mTLS authentication on the same Namespace, please contact :::info Using **both** API key and mTLS authentication on the **same** Namespace is in -[pre-release](/evaluate/development-production-features/release-stages) and doesn't support +[pre-release](/evaluate/product-release-stages) and doesn't support [High Availability features](/cloud/high-availability) or authenticating with an API Key to a Namespace Endpoint. ::: diff --git a/docs/cloud/high-availability/index.mdx b/docs/cloud/high-availability/index.mdx index 9d8fac0a0e..6ffb273c8b 100644 --- a/docs/cloud/high-availability/index.mdx +++ b/docs/cloud/high-availability/index.mdx @@ -130,7 +130,7 @@ These are often major concerns for financial services, e-commerce, gaming, globa In selected regions, you can add a replica to a Namespace in the same region. Temporal operates a "cell architecture" and will replicate the Namespace across multiple cells in that region. -This feature is currently in [Public Preview](/evaluate/development-production-features/release-stages) in selected regions. +This feature is currently in [Public Preview](/evaluate/product-release-stages) in selected regions. Failovers between cells are always managed automatically by Temporal. Unlike Multi-region and Multi-cloud Replication, you cannot disable automatic failovers and you cannot trigger a manual failover for a Same-region Replication Namespace. See [Failovers](/cloud/high-availability/failovers) for details. diff --git a/docs/cloud/metrics/openmetrics/api-reference.mdx b/docs/cloud/metrics/openmetrics/api-reference.mdx index 2917e814ff..d78bbc6155 100644 --- a/docs/cloud/metrics/openmetrics/api-reference.mdx +++ b/docs/cloud/metrics/openmetrics/api-reference.mdx @@ -215,8 +215,8 @@ Each descriptor includes a `release_stage` field that reports the metric's lifec | Value | Description | | ----- | ----- | -| `public-preview` | The metric is in [Public Preview](/evaluate/development-production-features/release-stages#public-preview) | -| `general-availability` | The metric is in [General Availability](/evaluate/development-production-features/release-stages#general-availability) | +| `public-preview` | The metric is in [Public Preview](/evaluate/product-release-stages#public-preview) | +| `general-availability` | The metric is in [General Availability](/evaluate/product-release-stages#general-availability) | | `deprecated` | The metric is deprecated | #### Query parameters diff --git a/docs/cloud/nexus/index.mdx b/docs/cloud/nexus/index.mdx index 76a41c0b61..5cc68440e5 100644 --- a/docs/cloud/nexus/index.mdx +++ b/docs/cloud/nexus/index.mdx @@ -26,5 +26,5 @@ Temporal Cloud builds on the [core Nexus experience](/nexus) with: ## Learn more -- [Evaluate Nexus](/evaluate/nexus) | [Keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082) +- [Evaluate Nexus](/evaluate/features/nexus) | [Keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082) - [How Nexus works](/nexus) | [Deep dive talk](https://www.youtube.com/watch?v=izR9dQ_eIe4&t=934s) diff --git a/docs/demos/standalone-activities.mdx b/docs/demos/standalone-activities.mdx index eb90c8a91c..4712d44568 100644 --- a/docs/demos/standalone-activities.mdx +++ b/docs/demos/standalone-activities.mdx @@ -17,7 +17,7 @@ import { StandaloneActivityDemo, ReleaseNoteHeader, SdkGuideLinks } from '@site/ languages={["Go", "Python", "Java", ".NET", "TypeScript", "Ruby"]} guidePath="activities/standalone-activities" > - Available in [Temporal Cloud](/standalone-activity#temporal-cloud-support) and in the [Temporal CLI](/standalone-activity#temporal-cli-support) v1.7.0 or higher with Temporal Server v1.31.0 or higher. Java SDK support is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release). + Available in [Temporal Cloud](/standalone-activity#temporal-cloud-support) and in the [Temporal CLI](/standalone-activity#temporal-cli-support) v1.7.0 or higher with Temporal Server v1.31.0 or higher. Java SDK support is in [Pre-release](/evaluate/product-release-stages#pre-release). Standalone Activities let you run a single Activity straight from your application without diff --git a/docs/develop/dotnet/nexus/feature-guide.mdx b/docs/develop/dotnet/nexus/feature-guide.mdx index a57d3e0491..52f5cde172 100644 --- a/docs/develop/dotnet/nexus/feature-guide.mdx +++ b/docs/develop/dotnet/nexus/feature-guide.mdx @@ -13,7 +13,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { CaptionedImage } from '@site/src/components'; -Use [Temporal Nexus](/evaluate/nexus) to connect Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. +Use [Temporal Nexus](/evaluate/features/nexus) to connect Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. :::tip @@ -665,6 +665,6 @@ For **synchronous Nexus Operations** the following are reported in the caller's ## Learn more -- Read the high-level description of the [Temporal Nexus feature](/evaluate/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082). +- Read the high-level description of the [Temporal Nexus feature](/evaluate/features/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082). - Learn how Nexus works in the [Nexus deep dive talk](https://www.youtube.com/watch?v=izR9dQ_eIe4) and [Encyclopedia](/nexus). - Deploy Nexus Endpoints in production with [Temporal Cloud](/cloud/nexus). diff --git a/docs/develop/dotnet/nexus/quickstart.mdx b/docs/develop/dotnet/nexus/quickstart.mdx index 93fc65640f..f9eec15b51 100644 --- a/docs/develop/dotnet/nexus/quickstart.mdx +++ b/docs/develop/dotnet/nexus/quickstart.mdx @@ -13,10 +13,10 @@ hide_table_of_contents: true import { SetupSteps, SetupStep, CodeSnippet } from '@site/src/components'; -[Temporal Nexus](/evaluate/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. +[Temporal Nexus](/evaluate/features/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. :::info -To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). +To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/features/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). ::: **Prerequisites:** Complete the [.NET SDK Quickstart](/develop/dotnet/set-up-your-local-dotnet) first. diff --git a/docs/develop/go/nexus/feature-guide.mdx b/docs/develop/go/nexus/feature-guide.mdx index 66365ed25a..732a6fc5ec 100644 --- a/docs/develop/go/nexus/feature-guide.mdx +++ b/docs/develop/go/nexus/feature-guide.mdx @@ -15,7 +15,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { CaptionedImage } from '@site/src/components'; -Use [Temporal Nexus](/evaluate/nexus) to connect Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. +Use [Temporal Nexus](/evaluate/features/nexus) to connect Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. :::tip @@ -812,6 +812,6 @@ For **synchronous Nexus Operations** the following are reported in the caller's ## Learn more -- Read the high-level description of the [Temporal Nexus feature](/evaluate/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082). +- Read the high-level description of the [Temporal Nexus feature](/evaluate/features/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082). - Learn how Nexus works in the [Nexus deep dive talk](https://www.youtube.com/watch?v=izR9dQ_eIe4) and [Encyclopedia](/nexus). - Deploy Nexus Endpoints in production with [Temporal Cloud](/cloud/nexus). diff --git a/docs/develop/go/nexus/quickstart.mdx b/docs/develop/go/nexus/quickstart.mdx index 3557cf8a87..eb35da0be5 100644 --- a/docs/develop/go/nexus/quickstart.mdx +++ b/docs/develop/go/nexus/quickstart.mdx @@ -15,10 +15,10 @@ import { SetupSteps, SetupStep, CodeSnippet } from '@site/src/components'; # Nexus Go Quickstart -[Temporal Nexus](/evaluate/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. +[Temporal Nexus](/evaluate/features/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. :::info -To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). +To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/features/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). ::: **Prerequisites:** Complete the [Go SDK Quickstart](/develop/go/set-up-your-local-go) first. diff --git a/docs/develop/go/platform/observability.mdx b/docs/develop/go/platform/observability.mdx index ecb6ff99f3..b4ba1112ca 100644 --- a/docs/develop/go/platform/observability.mdx +++ b/docs/develop/go/platform/observability.mdx @@ -30,7 +30,7 @@ For a complete list of metrics capable of being emitted, see the [SDK metrics re To instrument Temporal applications with OpenTelemetry, use the [OpenTelemetry v2 integration](/develop/go/integrations/opentelemetry-v2) -([Pre-release](/evaluate/development-production-features/release-stages#pre-release)). +([Pre-release](/evaluate/product-release-stages#pre-release)). It propagates OpenTelemetry context across Temporal boundaries and is replay-safe when instrumenting Workflows. @@ -152,7 +152,7 @@ Tracing allows you to view the call graph of a Workflow along with its Activitie To instrument Temporal applications with OpenTelemetry, use the [OpenTelemetry v2 integration](/develop/go/integrations/opentelemetry-v2) -([Pre-release](/evaluate/development-production-features/release-stages#pre-release)). +([Pre-release](/evaluate/product-release-stages#pre-release)). It propagates OpenTelemetry context across Temporal boundaries and is replay-safe when instrumenting Workflows. diff --git a/docs/develop/java/nexus/feature-guide.mdx b/docs/develop/java/nexus/feature-guide.mdx index 731a3ecd25..73da93171b 100644 --- a/docs/develop/java/nexus/feature-guide.mdx +++ b/docs/develop/java/nexus/feature-guide.mdx @@ -14,7 +14,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { CaptionedImage } from '@site/src/components'; -Use [Temporal Nexus](/evaluate/nexus) to connect Temporal Applications within and across Namespaces using a Nexus +Use [Temporal Nexus](/evaluate/features/nexus) to connect Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. :::tip @@ -871,7 +871,7 @@ For **synchronous Nexus Operations** the following are reported in the caller's ## Learn more -- Read the high-level description of the [Temporal Nexus feature](/evaluate/nexus) and watch the +- Read the high-level description of the [Temporal Nexus feature](/evaluate/features/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082). - Learn how Nexus works in the [Nexus deep dive talk](https://www.youtube.com/watch?v=izR9dQ_eIe4) and [Encyclopedia](/nexus). diff --git a/docs/develop/java/nexus/quickstart.mdx b/docs/develop/java/nexus/quickstart.mdx index 62ff89f48d..73182988c5 100644 --- a/docs/develop/java/nexus/quickstart.mdx +++ b/docs/develop/java/nexus/quickstart.mdx @@ -13,10 +13,10 @@ hide_table_of_contents: true import { SetupSteps, SetupStep, CodeSnippet } from '@site/src/components'; -[Temporal Nexus](/evaluate/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. +[Temporal Nexus](/evaluate/features/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. :::info -To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). +To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/features/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). ::: **Prerequisites:** Complete the [Java SDK Quickstart](/develop/java/set-up-your-local-java) first. diff --git a/docs/develop/plugins-guide.mdx b/docs/develop/plugins-guide.mdx index 6db790e196..05fb200188 100644 --- a/docs/develop/plugins-guide.mdx +++ b/docs/develop/plugins-guide.mdx @@ -191,7 +191,7 @@ requirements: meaning it produces the same commands and results when replayed. For example, don't call system time APIs, generate random values, or perform direct network and file I/O from Workflow-context code; move that work to Activities or Nexus Operations. -- See [observability](/evaluate/development-production-features/observability) to avoid duplicating observation side +- See [observability](/evaluate/features/observability) to avoid duplicating observation side effects when Workflows replay. - Put other side effects inside of Activities or [Local Activities](/local-activity). This helps your Workflow handle being restarted, resumed, or executed in a different process from where it originally began without losing correctness @@ -208,7 +208,7 @@ queues and Workers. Users use Workflows for: - Orchestration and decision-making -- Interactivity via [message-passing](/evaluate/development-production-features/workflow-message-passing) +- Interactivity via [message-passing](/evaluate/features/workflow-message-passing) - Tracing and observability #### Making changes to your library diff --git a/docs/develop/python/nexus/feature-guide.mdx b/docs/develop/python/nexus/feature-guide.mdx index 440e20b1b4..912ed3090d 100644 --- a/docs/develop/python/nexus/feature-guide.mdx +++ b/docs/develop/python/nexus/feature-guide.mdx @@ -14,7 +14,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { CaptionedImage } from '@site/src/components'; -Use [Temporal Nexus](/evaluate/nexus) to connect Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. +Use [Temporal Nexus](/evaluate/features/nexus) to connect Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. :::tip @@ -509,6 +509,6 @@ For **synchronous Nexus Operations** the following are reported in the caller's ## Learn more -- Read the high-level description of the [Temporal Nexus feature](/evaluate/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082). +- Read the high-level description of the [Temporal Nexus feature](/evaluate/features/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082). - Learn how Nexus works in the [Nexus deep dive talk](https://www.youtube.com/watch?v=izR9dQ_eIe4) and [Encyclopedia](/nexus). - Deploy Nexus Endpoints in production with [Temporal Cloud](/cloud/nexus). diff --git a/docs/develop/python/nexus/quickstart.mdx b/docs/develop/python/nexus/quickstart.mdx index 1271af8f3f..6b0a7758e3 100644 --- a/docs/develop/python/nexus/quickstart.mdx +++ b/docs/develop/python/nexus/quickstart.mdx @@ -15,10 +15,10 @@ import { SetupSteps, SetupStep, CodeSnippet } from '@site/src/components'; # Nexus Python Quickstart -[Temporal Nexus](/evaluate/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. +[Temporal Nexus](/evaluate/features/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. :::info -To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). +To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/features/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). ::: **Prerequisites:** Complete the [Python SDK Quickstart](/develop/python/set-up-your-local-python) first. diff --git a/docs/develop/ruby/workflows/message-passing.mdx b/docs/develop/ruby/workflows/message-passing.mdx index 45c3c6119c..7c8a7bf669 100644 --- a/docs/develop/ruby/workflows/message-passing.mdx +++ b/docs/develop/ruby/workflows/message-passing.mdx @@ -305,7 +305,7 @@ To send an Update to a Workflow Execution, you can: :::tip Stability -In [Public Preview](/evaluate/development-production-features/release-stages#public-preview) in Temporal Cloud. +In [Public Preview](/evaluate/product-release-stages#public-preview) in Temporal Cloud. Minimum Temporal Server version [Temporal Server version 1.26](https://github.com/temporalio/temporal/releases/tag/v1.26.2) diff --git a/docs/develop/typescript/nexus/feature-guide.mdx b/docs/develop/typescript/nexus/feature-guide.mdx index 891270c394..fc47e58aae 100644 --- a/docs/develop/typescript/nexus/feature-guide.mdx +++ b/docs/develop/typescript/nexus/feature-guide.mdx @@ -13,7 +13,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { CaptionedImage } from "@site/src/components"; -Use [Temporal Nexus](/evaluate/nexus) to connect Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. +Use [Temporal Nexus](/evaluate/features/nexus) to connect Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. :::tip @@ -539,6 +539,6 @@ For custom interceptor logic beyond tracing (for example, logging, authorization ## Learn more -- Read the high-level description of the [Temporal Nexus feature](/evaluate/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082). +- Read the high-level description of the [Temporal Nexus feature](/evaluate/features/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082). - Learn how Nexus works in the [Nexus deep dive talk](https://www.youtube.com/watch?v=izR9dQ_eIe4) and [Encyclopedia](/nexus). - Deploy Nexus Endpoints in production with [Temporal Cloud](/cloud/nexus). diff --git a/docs/develop/typescript/nexus/quickstart.mdx b/docs/develop/typescript/nexus/quickstart.mdx index ac85852eed..0cc9a5477c 100644 --- a/docs/develop/typescript/nexus/quickstart.mdx +++ b/docs/develop/typescript/nexus/quickstart.mdx @@ -13,10 +13,10 @@ hide_table_of_contents: true import { SetupSteps, SetupStep, CodeSnippet } from '@site/src/components'; -[Temporal Nexus](/evaluate/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. +[Temporal Nexus](/evaluate/features/nexus) connects Temporal Applications within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations. Build a Nexus Service that wraps an existing Temporal Workflow, then invoke it from a caller Workflow. :::info -To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). +To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/features/nexus). To learn how Nexus works, see [Temporal Nexus](/nexus). ::: **Prerequisites:** Complete the [TypeScript SDK Quickstart](/develop/typescript/set-up-your-local-typescript) first. diff --git a/docs/encyclopedia/activities/activity-operations.mdx b/docs/encyclopedia/activities/activity-operations.mdx index 7ea73a490a..8c647343db 100644 --- a/docs/encyclopedia/activities/activity-operations.mdx +++ b/docs/encyclopedia/activities/activity-operations.mdx @@ -27,7 +27,7 @@ API. Activity Operations don't apply to [Local Activities](/local-activity) or :::note Public Preview -Activity Operations are in [Public Preview](/evaluate/development-production-features/release-stages#public-preview). +Activity Operations are in [Public Preview](/evaluate/product-release-stages#public-preview). Pause, Unpause, and Reset are available in Server v1.28.0+. Self-hosted UI requires v2.47.0+. Activity Operations aren't available as SDK client methods. They're operational controls designed for the CLI, UI, and diff --git a/docs/encyclopedia/activities/standalone-activity.mdx b/docs/encyclopedia/activities/standalone-activity.mdx index 200ec13f25..0a30fd6432 100644 --- a/docs/encyclopedia/activities/standalone-activity.mdx +++ b/docs/encyclopedia/activities/standalone-activity.mdx @@ -27,7 +27,7 @@ See [limitations](#public-preview-limitations) below. If you need to orchestrate multiple Activities, use a [Workflow](/workflows). But if you just need to execute a single Activity, use a Standalone Activity. -Standalone Activities are Temporal’s [job queue](/evaluate/development-production-features/job-queue) - +Standalone Activities are Temporal’s [job queue](/evaluate/features/job-queue) - the simplest way to run durable, retryable tasks on Temporal.
@@ -63,7 +63,7 @@ Pick your SDK and follow the quickstart: ## Use cases Standalone Activities can be used for [durable job processing use -cases](/evaluate/development-production-features/job-queue) such as sending an email, processing a +cases](/evaluate/features/job-queue) such as sending an email, processing a webhook, syncing data, or executing a single function reliably with built-in retries and timeouts. ## Key features diff --git a/docs/encyclopedia/namespaces/namespaces.mdx b/docs/encyclopedia/namespaces/namespaces.mdx index ceb07cf8a5..947a708ffc 100644 --- a/docs/encyclopedia/namespaces/namespaces.mdx +++ b/docs/encyclopedia/namespaces/namespaces.mdx @@ -13,7 +13,7 @@ tags: :::info Open source and Temporal Cloud This page covers core namespace concepts that apply to both open source Temporal and Temporal Cloud. -Temporal Cloud namespaces include additional capabilities, such as [API key](/cloud/api-keys) and [mTLS authentication](/cloud/certificates), [built-in role-based access controls](/cloud/manage-access/roles-and-permissions#namespace-level-permissions), [high availability replication](/cloud/high-availability), and [namespace tags](/cloud/namespaces#tag-a-namespace). +Temporal Cloud namespaces include additional capabilities, such as [API key](/cloud/api-keys) and [mTLS authentication](/cloud/certificates), [built-in role-based access controls](/cloud/manage-access/roles-and-permissions#namespace-level-permissions), [separate rate limits](/cloud/limits#namespace-level), [high availability replication](/cloud/high-availability), and [namespace tags](/cloud/namespaces#tag-a-namespace). Moving from self-hosting to Cloud, or the reverse, requires zero code changes and incurs zero downtime. ::: @@ -31,8 +31,13 @@ When a Workflow Execution is spawned, it does so within a specific Namespace. - **Configuration boundaries**: Options like the [Retention Period](/temporal-service/temporal-server#retention-period) and [Archival](/temporal-service/archival) destination are configured per Namespace. - **Default Namespace**: If no Namespace is specified, the Temporal Service uses the Namespace "default" for all Temporal SDKs and the Temporal CLI. You must create a Namespace before using it in your Client. +- **Access control**: In self-hosted Temporal, use a custom [Authorizer](/self-hosted-guide/security#authorization) on your Frontend Service to restrict who can access each Namespace. + Temporal Cloud provides [role-based access controls](/cloud/manage-access/roles-and-permissions#namespace-level-permissions) instead. +- **Inter-Namespace communication**: Namespaces are isolated by default. + [Nexus](/nexus) is the controlled path for Workflows in one Namespace to call operations in another. - **Multi-tenancy**: A single Namespace is still multi-tenant. Multiple applications or teams can share a Namespace, but must coordinate on Workflow ID and Task Queue naming to avoid conflicts. + For architectural guidance, see [Multi-tenant application patterns](/best-practices/multi-tenant-patterns). ## Namespace operations diff --git a/docs/encyclopedia/nexus/nexus.mdx b/docs/encyclopedia/nexus/nexus.mdx index 3f6cf3bd94..5740dc6439 100644 --- a/docs/encyclopedia/nexus/nexus.mdx +++ b/docs/encyclopedia/nexus/nexus.mdx @@ -13,7 +13,7 @@ import { CaptionedImage, SdkGuideLinks } from '@site/src/components'; :::info NEW TO NEXUS? -This page explains what Nexus is and how it works. To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/nexus). +This page explains what Nexus is and how it works. To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/features/nexus). ::: diff --git a/docs/encyclopedia/workflow/cancellation-and-termination.mdx b/docs/encyclopedia/workflow/cancellation-and-termination.mdx new file mode 100644 index 0000000000..34ff95c796 --- /dev/null +++ b/docs/encyclopedia/workflow/cancellation-and-termination.mdx @@ -0,0 +1,136 @@ +--- +id: cancellation-and-termination +title: Cancellation and Termination +sidebar_label: Cancellation and Termination +description: + Cancellation asks a Workflow to stop and run cleanup. Termination stops it immediately without cleanup. Compare the two + and what each records. +toc_max_heading_level: 4 +tags: + - Concepts + - Workflows + - Activities +--- + +Cancellation and Termination both stop a [Workflow Execution](/workflow-execution) before it finishes on its own. They +differ in whether your Workflow code gets a say. + +Cancellation is cooperative. The Temporal Service delivers the request to the Workflow, and the Workflow decides what to +do with it, which means it can release resources, compensate for completed steps, and choose its own closing status. +Termination is forceful. The Workflow Execution is closed immediately and Workflow code never sees the request, so no +cleanup runs. + +Prefer Cancellation. Reach for Termination when a Workflow can't process a Cancellation request, such as when it's +blocked on a non-deterministic error or has no Workers to run its Tasks. + +## Operations summary + +| Operation | What it does | CLI | +| ------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| [Cancellation](#cancellation) | Asks the Workflow to stop, letting it run cleanup first. | [`temporal workflow cancel`](/cli/command-reference/workflow#cancel) | +| [Termination](#termination) | Closes the Workflow Execution immediately, with no cleanup. | [`temporal workflow terminate`](/cli/command-reference/workflow#terminate) | + +Both operations are also available through the Web UI, the SDK Clients, and the gRPC API. Both accept a +[List Filter](/list-filter) instead of a Workflow Id to act on matching Workflow Executions in bulk. + +## Cancellation + +### What happens when you cancel a Workflow + +- A [WorkflowExecutionCancelRequested](/references/events#workflowexecutioncancelrequested) Event is recorded, carrying + the requester's identity and the reason. +- The Temporal Service schedules a new [Workflow Task](/tasks#workflow-task), so the Workflow can react to the request. +- The SDK surfaces the request to Workflow code as a Cancelled Failure. See + [How Temporal represents failures](/encyclopedia/application-failures#failure-representation). +- The Workflow runs whatever cleanup its implementation supports. +- The closing status depends on what the Workflow does next. + +Because Cancellation is delivered as a failure, unhandled Cancellation closes the Workflow Execution as **Canceled** +rather than Failed, recording a [WorkflowExecutionCanceled](/references/events#workflowexecutioncanceled) Event. A +Workflow that handles the request and returns normally closes as **Completed**. Both are valid outcomes; which one you +want is a business decision, not a technical one. + +Cleanup that calls Activities has to run outside the canceled scope, because a canceled scope can't schedule new work. +Each SDK provides a mechanism for this, such as `workflow.NewDisconnectedContext` in Go. See the SDK guides below. + +### Cancellation and Activities + +Activity Cancellations are delivered to the Activity when it [Heartbeats](/encyclopedia/detecting-activity-failures#activity-heartbeat). +This has two consequences worth planning around: + +- An Activity that doesn't Heartbeat can't receive a Cancellation. It runs to completion, fails, or times out. +- Heartbeat throttling can delay delivery, so Cancellation may reach the Activity later than the request was made. + +If you need a long-running Activity to stop when its Workflow is canceled, it has to Heartbeat. + +### Cancellation across Workflow boundaries + +A Workflow can request Cancellation of another Workflow Execution. This records a +[RequestCancelExternalWorkflowExecutionInitiated](/references/events#requestcancelexternalworkflowexecutioninitiated) +Event in the requesting Workflow, followed by +[ExternalWorkflowExecutionCancelRequested](/references/events#externalworkflowexecutioncancelrequested) once the Service +delivers it. When the target is a [Child Workflow](/child-workflows), the parent records +[ChildWorkflowExecutionCanceled](/references/events#childworkflowexecutioncanceled). + +## Termination + +### What happens when you terminate a Workflow + +- A [WorkflowExecutionTerminated](/references/events#workflowexecutionterminated) Event is recorded with the reason and + the requester's identity. This is the closing Event in the Workflow Execution's Event History. +- Workflow code can't see or respond to the termination, so no cleanup runs and no compensation happens. +- Pending Activities are not given a chance to stop cleanly. + +The reason is optional and defaults to the current user's name. Provide one — it's the only record of why the Workflow +Execution was stopped. + +Anything a terminated Workflow would have cleaned up is left as it was: reserved inventory stays reserved, held locks +stay held, partial writes stay written. If that matters for your use case, cancel instead, and terminate only if the +Cancellation doesn't take effect. + +## Which one should you use? + +| | Cancellation | Termination | +| ---------------------------- | ----------------------------------------------- | ---------------------------------- | +| **Workflow code notified?** | Yes, as a Cancelled Failure | No | +| **Cleanup and compensation** | Runs, if the Workflow implements it | Doesn't run | +| **Closing status** | Canceled, or Completed if the Workflow handles it and returns normally | Terminated | +| **Closing Event** | WorkflowExecutionCanceled | WorkflowExecutionTerminated | +| **Takes effect** | On the next Workflow Task | Immediately | +| **Works on a stuck Workflow** | No, the Workflow has to process the request | Yes | +| **Failure type** | Cancelled Failure | Terminated Failure | + +## Child Workflows + +A [Parent Close Policy](/parent-close-policy) decides what happens to a Child Workflow Execution when its parent reaches +a Closed status. Two of the three values are these same operations: + +- **Terminate** (the default): the child is forcefully Terminated. +- **Request Cancel**: a Cancellation request is sent to the child. +- **Abandon**: the child isn't affected. + +Each child sets its own policy, so a parent can terminate some children, cancel others, and leave the rest running. + +## Related controls + +These operations also stop a Workflow Execution from progressing, but they aren't Cancellation or Termination: + +- **[Workflow Pause](/encyclopedia/workflow/workflow-pause)** holds a Workflow Execution in place without closing it or + losing state. A cancel request sent to a Paused Workflow is recorded and takes effect after the Workflow is Unpaused. A terminate request takes effect immediately. +- **[Reset](/cli/command-reference/workflow#reset)** terminates the current Run and starts a new Run from a point you + choose in the Event History. Use it when a Workflow is blocked by a non-deterministic error you've since fixed. +- **Timeouts** close a Workflow Execution as Timed Out rather than Canceled or Terminated. See + [Detecting Workflow failures](/encyclopedia/detecting-workflow-failures). + +## Handle Cancellation in your SDK + +Cancellation is the half of this that needs Workflow code. Termination needs none. + +- [.NET SDK](/develop/dotnet/workflows/cancellation) +- [Go SDK](/develop/go/workflows/cancellation) +- [Java SDK](/develop/java/workflows/cancellation) +- [PHP SDK](/develop/php/workflows/cancellation) +- [Python SDK](/develop/python/workflows/cancellation) +- [Ruby SDK](/develop/ruby/workflows/cancellation) +- [Rust SDK](/develop/rust/workflows/cancellation) +- [TypeScript SDK](/develop/typescript/workflows/cancellation) diff --git a/docs/encyclopedia/workflow/workflow-pause.mdx b/docs/encyclopedia/workflow/workflow-pause.mdx index 3f04e32668..e7b767db12 100644 --- a/docs/encyclopedia/workflow/workflow-pause.mdx +++ b/docs/encyclopedia/workflow/workflow-pause.mdx @@ -156,7 +156,7 @@ request ID. - Signals are accepted while Paused and processed after the Workflow is Unpaused. - Updates and Queries are rejected while Paused. - Cancel requests are recorded while Paused, but cancellation takes effect after the Workflow is Unpaused. -- [Terminate](/evaluate/development-production-features/interrupt-workflow) requests still terminate the Workflow +- [Terminate](/encyclopedia/workflow/cancellation-and-termination#termination) requests still terminate the Workflow immediately. - Resetting a Paused Workflow terminates the current Run and starts a new Run from the selected reset point. diff --git a/docs/evaluate/development-production-features/cloud-automation.mdx b/docs/evaluate/development-production-features/cloud-automation.mdx deleted file mode 100644 index 6a7934552c..0000000000 --- a/docs/evaluate/development-production-features/cloud-automation.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -id: cloud-automation -title: Cloud automation - Temporal feature -description: Explore how cloud automation simplifies cloud management and enhances security through APIs, Terraform, and CLI. -sidebar_label: Cloud automation -tags: -- Temporal Cloud -- tcld -- API Keys -- Terraform ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -Temporal Cloud Automation changes how you manage and scale your cloud infrastructure. -Its features enable you to automate critical tasks like user and namespace management, mTLS certificate rotation, and access control, ensuring security and operational efficiency. -Cloud Automation offers secure authentication across all interfaces, reducing errors and enhancing security. - -**Key Features:** - -- [Secure API Keys](/cloud/api-keys): Manage resources securely with Temporal Cloud API Keys. -- [Temporal CLI Cloud extension](/cli/cloud): Automate Cloud operations from the Temporal CLI. -- [Temporal Cloud CLI (tcld)](/cloud/tcld): Automate operations directly from the command line. -- [Terraform Provider for Cloud](/cloud/terraform-provider#prerequisites): Scale effortlessly with infrastructure-as-code. - - - - - - - - - -From centralizing cloud operations and automating certificate rotation to streamlining user management and onboarding new teams, Temporal's Cloud Automation features cover a wide range of use cases that enhance efficiency and security across your organization. diff --git a/docs/evaluate/development-production-features/core-application.mdx b/docs/evaluate/development-production-features/core-application.mdx deleted file mode 100644 index 5aef3153af..0000000000 --- a/docs/evaluate/development-production-features/core-application.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: core-application -title: Core application - Temporal feature -description: Discover Temporal's Workflow, Activity, and Worker framework; orchestrate steps, encapsulate business logic, and execute code efficiently using the Temporal SDK in your favorite language. -sidebar_label: Core application -tags: - - Workflows - - Activities - - Workers - - Temporal SDKs ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -**Workflows**, **Activities**, **Standalone Activities**, and **Workers** form the core parts of a Temporal Application. - -**Workflows**: A Workflow defines the overall flow of the application. -You write it in your programming language of choice using the Temporal SDK. -Conceptually, a Workflow specifies a sequence of steps and orchestrates the execution of Activities. - -**Activities**: An Activity is a method or function that encapsulates business logic prone to failure (for example, calling a service that may go down). -The system can automatically retry these Activities upon some failures. -Activities perform a single, well-defined action, such as calling another service, transcoding a media file, or sending an email message. - -**Standalone Activities**: A Standalone Activity is a top-level [Activity Execution](/activity-execution) started directly by a [Client](/encyclopedia/temporal-client), without using a Workflow. Use a [Workflow](/workflows) to orchestrate multiple Activities, but if you just need to execute a single Activity, use a [Standalone Activity](/standalone-activity). Standalone Activities are Temporal's job queue. - -**Workers**: A Worker executes your Workflow and Activity code. - -**Follow one of our tutorials to [Get started](https://learn.temporal.io/getting_started/) learning how to develop Workflows and Activities and run them in Worker Processes.** - -Or jump straight to a Temporal SDK feature guide: - - - - - - - - - - - - -For a deep dive into Temporal Workflows, Activities, and Workers, visit the following Temporal Encyclopedia pages or enroll in one of [our courses](https://learn.temporal.io/courses/). - -- [Temporal Workflows](/workflows) -- [Temporal Activities](/activities) -- [Temporal Workers](/workers) diff --git a/docs/evaluate/development-production-features/data-encryption.mdx b/docs/evaluate/development-production-features/data-encryption.mdx deleted file mode 100644 index ba428ad09b..0000000000 --- a/docs/evaluate/development-production-features/data-encryption.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: data-encryption -title: Data encryption - Temporal feature -description: Implement data encryption in your Temporal Workflows to ensure the security and confidentiality of your data. -sidebar_label: Data encryption -tags: - - Codec Server - - Security - - Encryption - - Workflows ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -Data Converters in Temporal are SDK components that handle the serialization and encoding of data transmitted and received by a Temporal Client. -Workflow input and output need to be serialized and deserialized so they can be sent as JSON to the Temporal Service. - -Temporal provides its own default Data Converter logic, which is not apparent to a user if payloads contain plain text or JSON data. -For enhanced security, you can implement your own encryption standards using a Codec Server. -Temporal's data encryption capabilities ensure the security and confidentiality of your Workflows and provides protection without compromising performance. - -Jump straight to a Temporal SDK feature guide. - - - - - - - - - diff --git a/docs/evaluate/development-production-features/debugging.mdx b/docs/evaluate/development-production-features/debugging.mdx deleted file mode 100644 index 1afe5263f2..0000000000 --- a/docs/evaluate/development-production-features/debugging.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -id: debugging -title: Debugging - Temporal feature -description: Discover Temporal's comprehensive debugging capabilities; tools and frameworks that facilitate Workflow and activity debugging across different programming languages with Temporal. -sidebar_label: Debugging -tags: - - Debugging - - Errors ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -Temporal gives you the same debugging tools in development and production. These capabilities help developers inspect and troubleshoot Workflows and Activities with precision, ensuring that Workflows perform as expected. - -By leveraging detailed event histories and intuitive tooling, you can trace the execution path of Workflows, identify issues, and understand the state of your application at any given point in time. - -Jump straight to a Temporal SDK feature guide. - - - - - - - - - - diff --git a/docs/evaluate/development-production-features/failure-detection.mdx b/docs/evaluate/development-production-features/failure-detection.mdx deleted file mode 100644 index b38efa7494..0000000000 --- a/docs/evaluate/development-production-features/failure-detection.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: failure-detection -title: Failure detection - Temporal feature -description: Explore Temporal's robust timeout and Retry Policy features for Workflows and Activities. Start with our tutorials or dive deep with our SDK guides and Encyclopedia resources. -sidebar_label: Failure detection -tags: - - Workflows - - Activities - - Timeouts - - Failures - - Errors ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -In Temporal, timeouts detect application failures. -The system can then automatically mitigate these failures through retries. -Both major application function primitives, **Workflows** and **Activities**, have dedicated **timeout configurations** and can be configured with a **Retry Policy**. - -**Follow one of our tutorials to [Get started](https://learn.temporal.io/getting_started/) exploring timeouts and Retry Policies.** - -Or jump straight to a Temporal SDK feature guide. - - - - - - - - - - - - - - - - - - - - - - - -For a deep dive into timeouts and Retry Policies visit the following Temporal Encyclopedia pages or enroll in one of [our courses](https://learn.temporal.io/courses/). - - - - - - diff --git a/docs/evaluate/development-production-features/index.mdx b/docs/evaluate/development-production-features/index.mdx deleted file mode 100644 index 852df3a6d5..0000000000 --- a/docs/evaluate/development-production-features/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -id: index -title: Temporal development and production features -description: Leverage a Temporal SDK to develop robust applications featuring Workflows, Activities, Workers, testing suites, Temporal Clients, Scheduled Workflows, and advanced observability tools. -sidebar_label: Features ---- - -Through a Temporal SDK, Temporal provides a wide range of features that enable developers to build applications that serve a wide range of use cases. - -- **[Core application primitives](/evaluate/development-production-features/core-application)**: Develop and run your application with Workflows, Activities, and Workers. -- **[Testing suite](/evaluate/development-production-features/testing-suite)**: Each Temporal SDK comes with a testing suite that enables developers to test their applications as they would any other. -- **[Scheduled Workflows](/evaluate/development-production-features/schedules)**: Start a business process at a specific time or on a given time interval. -- **[Interrupt a Workflow](/evaluate/development-production-features/interrupt-workflow)**: Cancel or terminate a business process (Workflow) that is already in progress and compensate for any steps already taken. -- **Runtime safeguards**: Prevent avoidable errors and issues from executing during runtime. -- **[Failure detection and mitigation](/evaluate/development-production-features/failure-detection)**: Detect failures with timeouts and configure automatic retries to mitigate them. -- **[Temporal Nexus](/evaluate/nexus)**: Connect Temporal Applications across (and within) isolated Namespaces for improved modularity, security, debugging, and fault isolation. Nexus supports cross-team, cross-domain, and multi-region use cases. -- **[Workflow message passing](/evaluate/development-production-features/workflow-message-passing)**: Build responsive applications that react to events at runtime and enable data retrieval from ongoing Workflows. -- **Versioning**: Support multiple versions of your business logic for long-running business processes. -- **[Observability](/evaluate/development-production-features/observability)**: List business processes, view their state, and set up dashboards with metrics. -- **[Debugging](/evaluate/development-production-features/debugging)**: Surface errors and step through code to find issues. -- **[Data encryption](/evaluate/development-production-features/data-encryption)**: Transform data and protect the privacy of the users of your application. -- **[Throughput composability](/evaluate/development-production-features/throughput-composability)**: Breakup business processes by data streams, team ownership, or other organization factors. -- **[Cloud Automation](/evaluate/development-production-features/cloud-automation)**: Simplify cloud management and boost security with Temporal's Cloud Automation. -- **[Low Latency](/evaluate/development-production-features/low-latency)**: Making your applications faster, more performant, and more efficient. -- **[Multi-tenancy](/evaluate/development-production-features/multi-tenancy)**: Enhances efficiency and cost-effectiveness. - -For detailed information on Temporal feature release stages and criteria, see this [Product Release Stages Guide](/evaluate/development-production-features/release-stages). diff --git a/docs/evaluate/development-production-features/interrupt-a-workflow.mdx b/docs/evaluate/development-production-features/interrupt-a-workflow.mdx deleted file mode 100644 index f086eb3834..0000000000 --- a/docs/evaluate/development-production-features/interrupt-a-workflow.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -id: interrupt-workflow -title: Interrupt a Workflow - Cancellation and Termination -description: - Manage Workflow interruptions in Temporal; understand how to gracefully handle Workflow cancellations and terminations - to ensure proper cleanup and state management. -sidebar_label: Interrupt a Workflow -tags: - - Workflows ---- - -import { RelatedReadContainer, RelatedReadItem } from "@site/src/components"; - -Discover how Temporal enables you to gracefully handle Workflow interruptions through cancellations and terminations. -Understand how to stop a Workflow cleanly with cancellation, allowing for proper cleanup and state management. - -For situations where a Workflow is stuck, termination provides an immediate solution, ensuring your applications remain -robust and responsive. - - - - - - - - - - - diff --git a/docs/evaluate/development-production-features/job-queue.mdx b/docs/evaluate/development-production-features/job-queue.mdx deleted file mode 100644 index 2d79cd6592..0000000000 --- a/docs/evaluate/development-production-features/job-queue.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -id: job-queue -title: Job Queue -description: Standalone Activities adds the ability to execute any Temporal Activity as a top-level primitive without the full overhead of a Workflow. -tags: - - Features - - Standalone Activities ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -## What is a Job Queue? - -A job is a single, discrete unit of work that runs asynchronously in the background such as sending an email, processing a webhook, syncing data, or executing a single function reliably. - -A job queue is the system that manages these jobs: accepting work, dispatching it to workers, retrying on failure, and providing visibility into what's running and what failed. - -**[Standalone Activities](/standalone-activity) are Temporal's job queue.** - -They let you use Temporal Activities as background jobs, in addition to using the same Activities as steps inside a Workflow. You write an Activity once and can run it either as a background job or as part of a multi-step Workflow. - -Under the hood, Standalone Activities use Temporal's [Task Queues](/task-queue) for dispatching work to Workers. - -Temporal provides stronger guarantees, better visibility, and more control than traditional job queues - while remaining cost-effective for high-volume use cases and offering a clean upgrade path to multi-step workflow orchestration. - -### Overview - -Standalone Activities add the ability to execute any Temporal Activity as a top-level Activity Execution for durable job processing. - -#### Unified programming model & worker deployment - -- Write an Activity once and use it anywhere - with a unified Activity programming model -- Optional heartbeats support checkpointing for long-running jobs -- Deploy to an Activity Worker once, and invoke standalone or from within a Workflow - -#### Execution lifecycle - -- Jobs are submitted as Standalone Activity Executions -- Each job is durably persisted with Temporal reliability, so jobs are not lost -- Jobs are scheduled with priority, fairness, deduplication and no head-of-line blocking -- Workers poll task queues and execute Activities (you run your own Workers) -- Temporal ensures retries, timeouts, and exponential backoff policy is enforced - -#### Observability & lifecycle controls - -- Full job visibility (list, search) with detailed execution state, retry count, errors & results -- OpenMetrics support -- Lifecycle controls: cancel, pause, unpause, reset, terminate -- Manual completion for external integrations & on-call management - -## Next steps - -Learn more about [Standalone Activity concepts, features, and limitations](/standalone-activity), or jump to a language-specific quickstart: - -- [Go SDK - Standalone Activities quickstart and code sample](/develop/go/activities/standalone-activities-quickstart) -- [Python SDK - Standalone Activities quickstart and code sample](/develop/python/activities/standalone-activities-quickstart) -- [.NET SDK - Standalone Activities quickstart and code sample](/develop/dotnet/activities/standalone-activities-quickstart) -- [Java SDK - Standalone Activities quickstart and code sample](/develop/java/activities/standalone-activities-quickstart) -- [TypeScript SDK - Standalone Activities quickstart and code sample](/develop/typescript/activities/standalone-activities-quickstart) - -To build a job queue end to end, follow the Build a Job Queue with Standalone Activities tutorial in [Go](https://learn.temporal.io/tutorials/go/standalone-activities/), [Java](https://learn.temporal.io/tutorials/java/standalone-activities/), [Python](https://learn.temporal.io/tutorials/python/standalone-activities/), or [TypeScript](https://learn.temporal.io/tutorials/typescript/standalone-activities/). It covers idempotency keys, server-side deduplication, throughput limits, [Priority and Fairness](/develop/task-queue-priority-fairness), heartbeat checkpoints, and reusing the same Activity inside a Workflow. diff --git a/docs/evaluate/development-production-features/low-latency.mdx b/docs/evaluate/development-production-features/low-latency.mdx deleted file mode 100644 index 77ca885d45..0000000000 --- a/docs/evaluate/development-production-features/low-latency.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -id: low-latency -title: Low latency - Temporal feature -description: Discover how Temporal's design and features ensure low latency for your applications. -sidebar_label: Low latency -tags: - - Temporal Cloud ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -Temporal Cloud provides features that significantly reduce latency compared to self-hosted instances, making your applications faster, more performant, and more efficient. -In the world of modern applications, low latency is crucial for ensuring minimal delay in Workflow Executions. -This low-latency architecture ensures rapid Workflow Execution and responsiveness, critical for time-sensitive applications and high-performance systems. - -Temporal Cloud's custom persistence layer incorporates three key components that contribute to low latency: - -- **Better Sharding:** Distributes load across multiple databases, preventing bottlenecks. - Enables independent resizing, improving scalability and handling high-traffic events without delay. -- **Write-Ahead Log (WAL):** Aggregates updates before writing to the database, reducing write latency. - Stores writes in an append-only format, reducing latency and database size by batching updates before writing to the database. -- **Tiered Storage of Workflow Event History:** Offloads completed Workflow Event Histories, improving database efficiency. - -Temporal Cloud provides lower latency, making it suitable for latency-sensitive, large-scale, or business-critical applications. - - - - - - - - - - - diff --git a/docs/evaluate/development-production-features/multi-tenant.mdx b/docs/evaluate/development-production-features/multi-tenant.mdx deleted file mode 100644 index 20cfd022a9..0000000000 --- a/docs/evaluate/development-production-features/multi-tenant.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -id: multi-tenancy -title: Multi-tenancy - Temporal feature -description: Learn about Temporal's namespace isolation for multi-tenancy and how to build multi-tenant applications. -sidebar_label: Multi-tenancy -tags: -- Temporal Cloud -- Multitenancy ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -Multi-tenancy in Temporal operates at two levels: - -## Namespace isolation - -[Namespaces](/namespaces) are Temporal's unit of isolation, providing logical separation for multi-tenant deployments in both open source Temporal and Temporal Cloud. - -### Open source Temporal - -Namespaces in self-hosted Temporal provide: - -- **Workflow ID uniqueness**: Temporal guarantees unique Workflow IDs within a Namespace. Different Namespaces can have Workflows with the same ID without conflict. -- **Resource isolation**: Traffic from one Namespace does not impact other Namespaces on the same Temporal Service. -- **Configuration boundaries**: Settings like [Retention Period](/temporal-service/temporal-server#retention-period) and [Archival](/temporal-service/archival) destination are configured per Namespace. -- **Access control**: Use a custom [Authorizer](/self-hosted-guide/security#authorization) on your Frontend Service to restrict who can access each Namespace. -- **Inter-namespace communication**: Use [Nexus](/evaluate/nexus) for controlled communication between Namespaces. - -### Temporal Cloud - -Temporal Cloud builds on these capabilities with additional isolation guarantees: - -- **Independent authentication** via [API keys](/cloud/api-keys) or [mTLS certificates](/cloud/certificates) -- **Built-in [role-based access controls](/cloud/manage-access/roles-and-permissions#namespace-level-permissions)** without custom Authorizer configuration -- **Separate [rate limits](/cloud/limits#namespace-level)** to prevent noisy neighbor problems -- **[High availability replication](/cloud/high-availability)** across regions - - - - - - -## Application multi-tenancy - -Many organizations use Temporal to power their own multi-tenant SaaS applications, isolating their customers' workloads using Task Queues, Search Attributes, and Worker design patterns. - -See the [multi-tenant application patterns guide](/best-practices/multi-tenant-patterns) for detailed recommendations on architecting multi-tenant applications with Temporal. diff --git a/docs/evaluate/development-production-features/observability.mdx b/docs/evaluate/development-production-features/observability.mdx deleted file mode 100644 index 18f01df415..0000000000 --- a/docs/evaluate/development-production-features/observability.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -id: observability -title: Observability - Temporal feature -description: Explore the observability and visibility features of Temporal, including Metrics, Tracing, Logging, and Visibility. -sidebar_label: Observability -tags: - - Observability - - Metrics - - Logging - - Visibility ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -Temporal's observability feature helps you track the state of your Workflows in real-time, providing tools for detailed metrics, tracing, comprehensive logging, and visibility into your application state. - -Monitor performance, trace Activity and Workflow Executions, debug, and filter Workflow Executions to gain deeper insights into your Workflows. - -**Key Components of Temporal's Observability and Visibility** - -- **Metrics**: Detailed performance metrics to track the health and efficiency of your Temporal Service and Workflows. -- **Tracing**: End-to-end tracing of Workflow and Activity Executions to understand the flow and timing of operations. -- **Logging**: Comprehensive logging capabilities for debugging and auditing purposes. -- **Search Attributes**: Custom attributes that can be used to enhance searchability and provide additional context to Workflow Executions. -- **Web UI**: A user-friendly interface for visualizing and interacting with your Workflows and Temporal Service state. - -**Benefits of Temporal's Observability and Visibility Features** - -- **Real-time Monitoring**: Track the state and progress of your Workflows as they execute. -- **Performance Optimization**: Identify bottlenecks and optimize your Workflow and Activity implementations. -- **Effective Debugging**: Quickly locate and diagnose issues in your Temporal applications. -- **Compliance and Auditing**: Maintain detailed records of all Workflow executions for compliance and auditing purposes. -- **Operational Insights**: Gain a deep understanding of your application's behavior and usage patterns. -- **Scalability Management**: Monitor and manage the scalability of your Temporal Service effectively. - -Jump straight into the Temporal SDK feature guide. - - - - - - - - - - diff --git a/docs/evaluate/development-production-features/schedules.mdx b/docs/evaluate/development-production-features/schedules.mdx deleted file mode 100644 index b19716bea4..0000000000 --- a/docs/evaluate/development-production-features/schedules.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: schedules -title: Schedules - Temporal feature -description: Learn the benefits of scheduling Temporal Workflows and explore best practices to ensure timely and efficient execution of your business processes. -sidebar_label: Schedules -tags: - - Schedules - - Workflows ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -Temporal Schedules is a feature that allows you to "schedule" Temporal Workflows at specified times or intervals, adjusting for peak use. - -It offers a flexible way to automate and manage your Temporal Workflows, ensuring your business processes run smoothly and efficiently especially when handling time-sensitive tasks. - -1. **Automate Repetitive Tasks:** - Schedules automate repetitive tasks, reducing manual intervention and ensuring timely execution of business processes. -2. **Enhanced Workflow Control and Observability:** - Gain complete control over your automation processes. With Schedules, you can create, backfill, delete, describe, list, pause, trigger, and update Workflow Executions. -3. **Flexible Timing:** - Schedule Workflow Executions to run at regular intervals or specific future times, ensuring they execute precisely when needed. -4. **Reliable and Scalable:** - Designed for reliability and scalability, Temporal Schedules handle the complexities of distributed systems while ensuring your Workflows run as intended, even during failures. -5. **Eliminate External Dependencies:** - Schedules remove the need to integrate external scheduling systems. - -If a Workflow Execution started by a Schedule is [Paused](/cli/command-reference/workflow#pause), it remains open and can affect future scheduled starts through the Schedule's Overlap Policy. -For policy-specific behavior, see [Overlap Policy](/schedule#overlap-policy). - -Jump straight to a Temporal SDK feature guide. - - - - - - - - - - diff --git a/docs/evaluate/development-production-features/temporal-nexus.mdx b/docs/evaluate/development-production-features/temporal-nexus.mdx deleted file mode 100644 index 3e67bbf53a..0000000000 --- a/docs/evaluate/development-production-features/temporal-nexus.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: nexus -title: Temporal Nexus - Temporal feature -description: Temporal Nexus enables durable execution across team and namespace boundaries and promotes a modular architecture that enables each team to have its own namespace for improved security, troubleshooting, and blast radius isolation. -sidebar_label: Temporal Nexus -slug: /evaluate/nexus -tags: -- Nexus ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; -import { CaptionedImage } from '@site/src/components'; - -As Temporal adoption grows across teams, organizations partition their applications into isolated Namespaces for security and fault isolation. -Nexus bridges these boundaries, connecting Temporal applications across Namespaces, regions, and clouds with built-in durable execution, observability, and access control. -Each team retains ownership of their own Namespace while sharing capabilities through clean service contracts. -Watch the [Nexus overview](https://www.youtube.com/watch?v=tJ1OwSFokOg&t=117s) for a walkthrough. - -## Before Nexus -Connecting Namespaces was possible, but painful. It required extensive configuration, added operational overhead, and often depended on additional infrastructure - -- **Child Workflows** - Limited to the same Namespace. Cross-Namespace use leaks underlying implementation details, requiring callers to manage the target Namespace, Task Queue, and Workflow options. -- **Activity wrappers** - Require per-target mTLS clients, adding configuration and certificate management overhead. Often over-permissioned, lack built-in observability, and require error-prone boilerplate for async results. -- **Extra gateway infrastructure** - Not durable, difficult to debug across services, and adds another service to manage and patch. - -Nexus replaces all of these with a clean service contract between caller and handler, reducing code, and providing first-class observability. - -## Benefits - -Connect Temporal Applications across teams, domains, regions, and clouds with: - -- **Stronger security posture** - Built-in access controls for service contracts instead of broad Namespace access. Each team controls their own Namespace, Workers, and deployment lifecycle. -- **Higher reliability** - Durable, atomic handoffs eliminate lost requests. Faults are isolated so misbehaving Workers don't impact other teams. -- **Easier to build and maintain** - Less boilerplate code, custom retry and deduplication logic, and ongoing maintenance. Teams focus on business logic instead of infrastructure. -- **Scalable platform patterns** - Enables cross-team and cross-region orchestration without centralizing ownership. -- **Lower barriers to cross-team use cases** - Makes it easy to incrementally build and adopt shared services, with built-in discoverability. -- **Compliance and data isolation** - Isolated Namespaces support auditability, data residency requirements, and dedicated encryption and access controls for sensitive data (PCI, PII). - -## What customers are using Nexus for - -- **Duolingo** - Self-service infrastructure ([Case study](https://temporal.io/resources/case-studies/duolingo-temporal-nexus) | [Webinar](https://www.youtube.com/watch?v=tJ1OwSFokOg&t=524s)) -- **Netflix** - Infrastructure orchestration ([Replay talk](https://www.youtube.com/watch?v=izR9dQ_eIe4&t=470s) | [Webinar](https://www.youtube.com/watch?v=At1FfqGQiu0&t=1295s)) -- **Miro** - Cross-region data migration ([Replay talk](https://youtu.be/YLmFR-IAC3M?feature=shared&t=1488)) - - -## Should I use Nexus? - -Use the following decision tree to help determine if Nexus is right for your use case: - -
- -
- -## Get started {/* #learn-more */} - -Join the [#nexus](https://temporalio.slack.com/archives/C07LQN0JK9B) channel in [Temporal Slack](https://t.mp/slack) to connect with the Nexus community. - - - - - - - - - - - diff --git a/docs/evaluate/development-production-features/testing-suite.mdx b/docs/evaluate/development-production-features/testing-suite.mdx deleted file mode 100644 index c74b5f1632..0000000000 --- a/docs/evaluate/development-production-features/testing-suite.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: testing-suite -title: Temporal Testing Suite - Temporal feature -description: Explore Temporal's comprehensive testing suite; Frameworks that facilitate Workflow and integration testing across different programming languages with Temporal. -sidebar_label: Testing suite -tags: - - Testing ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -In the context of Temporal, you can create these types of automated tests: - -1. End-to-end: Running a Temporal Server and Worker with all its Workflows and Activities; starting and interacting with Workflows from a Client. -2. Integration: Anything between end-to-end and unit testing. - Running Activities with mocked Context and other SDK imports (and usually network requests). - Running Workers with mock Activities, and using a Client to start Workflows. - Running Workflows with mocked SDK imports. -3. Unit: Running a piece of Workflow or Activity code and mocking any code it calls. - -Jump straight to a Temporal SDK feature guide. - - - - - - - - - - diff --git a/docs/evaluate/development-production-features/throughput-composability.mdx b/docs/evaluate/development-production-features/throughput-composability.mdx deleted file mode 100644 index 49135bd7a6..0000000000 --- a/docs/evaluate/development-production-features/throughput-composability.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -id: throughput-composability -title: Child Workflows - Temporal feature -description: Use Temporal Child Workflows to partition steps, manage resources, invoke multiple services, and run periodic logic. -sidebar_label: Composability -tags: - - Child Workflows ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -In Temporal, **Child Workflows** enable applications to achieve another level of composability when it comes to throughput. - -The following example scenarios are a few reasons to use this feature: - -- To create a separate service that can be invoked from multiple other services or applications. -- To partition a step into smaller chunks. -- To manage a dedicated resource and guarantee uniqueness. -- To execute logic periodically without overwhelming the parent business process. - -See the SDK feature guides for implementation details: - - - - - - - - - - - - -For a deep dive into Child Workflows see the [Child Workflows Encyclopedia page](/child-workflows). diff --git a/docs/evaluate/development-production-features/workflow-message-passing.mdx b/docs/evaluate/development-production-features/workflow-message-passing.mdx deleted file mode 100644 index a3fd20ce6f..0000000000 --- a/docs/evaluate/development-production-features/workflow-message-passing.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -id: workflow-message-passing -title: Workflow message passing - Temporal feature -description: Enhance your Workflows with Signals and Queries, allowing dynamic responses to external events and real-time state access for comprehensive monitoring and tracking. -sidebar_label: Workflow message passing -tags: - - Signals - - Queries - - Updates - - Workflows - - Activities - - Workers ---- - -import { RelatedReadContainer, RelatedReadItem } from '@site/src/components'; - -Need to interact with your Workflow from outside of it? Think about use cases like these: - -- Your shipment-tracking Workflow needs to know when the item leaves the warehouse and is loaded into their truck. **Signal** your Workflow when the truck driver scans the barcode. -- Folks in your company want to track the progress of their data migration Workflows. **Query** your running batch Workflow to get the data for the progress bar. -- Your eCommerce shopping cart Workflow needs to know when a new item is added. **Update** it to add the item and receive back the current items to render. - -Temporal provides Signals, Queries, and Updates to allow rich interactivity with your running Workflows. - -**Signals**: Signal to send messages asynchronously to a running Workflow, changing its state or controlling its flow in real-time. - -**Queries**: Query to check the progress of your Workflow or debug the internal state in real-time. - -**Updates**: Update to send synchronous requests to your Workflow and track it in real-time. - -To learn more about using Signals, Queries, and Updates, see our encyclopedia entry: - - - - - -For a deeper dive into Workflow message passing, enroll in one of [our courses](https://learn.temporal.io/courses/interacting_with_workflows). - -If you want to jump straight to implementation details, see the SDK feature guides. - - - - - - - - - - - diff --git a/docs/evaluate/features/cancellation-and-termination.mdx b/docs/evaluate/features/cancellation-and-termination.mdx new file mode 100644 index 0000000000..973ad60ab2 --- /dev/null +++ b/docs/evaluate/features/cancellation-and-termination.mdx @@ -0,0 +1,102 @@ +--- +id: cancellation-and-termination +title: Cancellation and termination +description: + Stop a Workflow already in progress, either by asking it to unwind the work it has done or by closing it outright when + it can't respond. +sidebar_label: Cancellation and termination +tags: + - Workflows + - Activities +--- + +import PatternCards from '@site/src/components/PatternCards'; + +A business process that's already running sometimes has to stop: an order is retracted, a customer closes an account, a +deploy goes wrong. Temporal gives you two ways to stop a +[Workflow Execution](/workflow-execution), and the difference between them is whether your code gets to clean up after +itself. + +**Cancellation** asks the Workflow to stop. The Workflow receives the request, so it can release resources, undo steps it +has already taken, and notify other systems before closing. The steps it takes are your code, so you decide what +unwinding a half-finished process means. + +**Termination** closes the Workflow Execution immediately. Workflow code never sees the request and no cleanup runs. It +works on a Workflow that can't respond to anything, which is what makes it the fallback when Cancellation won't land. + +## What this means for your design + +- **You write the cleanup.** Temporal delivers the Cancellation request and + schedules a Workflow Task so your code can act on it. You can specify what to undo, and in what order. If your + process reserves inventory, charges cards, or provisions infrastructure, plan the unwind path alongside the forward + one. See the [Saga Pattern](/design-patterns/saga-pattern) for the usual structure. +- **Long-running Activities need Heartbeats to be cancellable.** Cancellation reaches an Activity when it Heartbeats, so + an Activity that never Heartbeats runs to completion regardless. This shapes how you write anything long-running. +- **You always have a way out.** A Workflow blocked by a bug, a bad deploy, or a missing Worker can still be terminated, + so a stuck process is never permanently stuck. +- **The record survives the stop.** Both operations are recorded in + [Event History](/workflow-execution/event#event-history) with who requested it and why, which matters for audit and + incident review. + +Cancellation and Termination close a Workflow for good. To hold one in place and resume it later, see +[Workflow Pause](/encyclopedia/workflow/workflow-pause). + +## Resources + +Read the Temporal Encyclopedia for conceptual depth: + +- [Cancellation and Termination](/encyclopedia/workflow/cancellation-and-termination) +- [Parent Close Policy](/parent-close-policy) + +Or jump straight to the SDK feature guide for implementation details: + + diff --git a/docs/evaluate/features/child-workflows.mdx b/docs/evaluate/features/child-workflows.mdx new file mode 100644 index 0000000000..09c3de0837 --- /dev/null +++ b/docs/evaluate/features/child-workflows.mdx @@ -0,0 +1,117 @@ +--- +id: child-workflows +title: Child Workflows +description: Child Workflows give part of a business process its own Event History, Workers, and lifecycle, with the limits and trade-offs versus one Workflow. +sidebar_label: Child Workflows +tags: + - Child Workflows + - Workflows + - Event History +--- + +import PatternCards from '@site/src/components/PatternCards'; + +A **[Child Workflow](/child-workflows)** is a [Workflow Execution](/workflow-execution) started by another Workflow. +The child gets its own [Event History](/workflow-execution/event#event-history), can run on a separate set of [Workers](/workers#worker), and has its own lifecycle. +That lets a Parent Workflow hand off part of a business process instead of running every step itself. + +## When to use a Child Workflow + +- **[Create a separate service](/child-workflows#create-a-separate-service)**: because a child can be processed by a completely separate set of Workers than its parent, it can act as its own service. Parent and child share no local state and communicate only through asynchronous [Signals](/sending-messages#sending-signals). To compose across Namespace boundaries, or between teams that own separate Temporal Applications, use [Temporal Nexus](/evaluate/features/nexus) instead. +- **[Partition a large workload](/child-workflows#partition-problems-into-smaller-chunks)**: each child has its own Event History, so splitting work across children raises the ceiling on how many steps one business process can take. +- **[Represent a single resource](/child-workflows#represent-a-single-resource)**: map one child to one resource and use its [Workflow Id](/workflow-execution/workflowid-runid) to guarantee uniqueness, which serializes every operation on that resource. +- **[Run periodic logic](/child-workflows#periodic-logic-execution)**: a child can call [Continue-As-New](/workflow-execution/continue-as-new) as many times as it needs and then complete. From the parent's point of view it was a single invocation, so the periodic work never fills the parent's Event History. + +## When not to use a Child Workflow + +- **For code organization alone.** Use the object-oriented structure and other organizing techniques your language already offers. +- **When the workload has a bounded size.** Start from a single Workflow Definition when you can put a ceiling on the number of Activity Executions and Signals. One Workflow is simpler to reason about than several communicating asynchronously. +- **When Activities would do.** Child Workflow Executions record more Events overall than Activities do, and each Event in an Event History costs compute. Start with a single Workflow that calls Activities, and add Child Workflows once you have a clear reason. + +### Child Workflow or Activity? + +Both are started from a Workflow, which makes the choice easy to get wrong. +A Child Workflow has access to all Workflow APIs but is subject to the same [deterministic constraints](/workflow-definition#deterministic-constraints) as any other Workflow. +An Activity has the inverse trade-off: no access to Workflow APIs, but no determinism constraints either. +See [Child Workflow versus an Activity](/child-workflows#child-workflow-versus-an-activity) for the full comparison. + +## Limits to plan for + +These numbers shape how you partition a business process: + +- A Workflow Execution's Event History is capped at 51,200 Events or 50 MB, with a warning at 10,240 Events or 10 MB. +- A Workflow Execution can have at most 2,000 incomplete Child Workflows at a time, by default. +- A Parent Workflow's Event History records Events for each child's status, so a single parent should not spawn more than about 1,000 Child Workflow Executions. +- Those figures compound: one parent running 1,000 children that each run 1,000 Activity Executions reaches 1,000,000 Activity Executions, far past what one Workflow Execution can hold. + +See [Workflow Execution limits](/workflow-execution/limits) for the full set. + +## Parent Close Policy + +Every Child Workflow Execution carries a [Parent Close Policy](/parent-close-policy) that decides what happens to the child when its parent reaches a Closed status: + +- **Terminate** (the default): the child is forcefully Terminated. +- **Request Cancel**: a Cancellation request is sent to the child. +- **Abandon**: the child keeps running. + +Each child can set its own policy, so a parent can terminate some children and leave others running. + +## Resources + +Read the Temporal Encyclopedia for conceptual depth: + +- [Child Workflows](/child-workflows) +- [Parent Close Policy](/parent-close-policy) + +Or jump straight to the SDK feature guide for implementation details: + + diff --git a/docs/evaluate/development-production-features/cloud-vs-self-hosted.mdx b/docs/evaluate/features/cloud-vs-self-hosted.mdx similarity index 100% rename from docs/evaluate/development-production-features/cloud-vs-self-hosted.mdx rename to docs/evaluate/features/cloud-vs-self-hosted.mdx diff --git a/docs/evaluate/features/core-primitives.mdx b/docs/evaluate/features/core-primitives.mdx new file mode 100644 index 0000000000..82842f243a --- /dev/null +++ b/docs/evaluate/features/core-primitives.mdx @@ -0,0 +1,91 @@ +--- +id: core-primitives +title: Core primitives +description: Discover Temporal's Workflow, Activity, and Worker framework; orchestrate steps, encapsulate business logic, and execute code efficiently using the Temporal SDK in your favorite language. +sidebar_label: Core primitives +tags: + - Workflows + - Activities + - Workers + - Temporal SDKs +--- + +import PatternCards from '@site/src/components/PatternCards'; + +[Workflows](/workflows), [Activities](/activities), [Standalone Activities](/standalone-activity), and [Workers](/workers) form the core parts of a Temporal Application. + +**[Workflows](/workflows)**: A Workflow defines the overall flow of the application. +You write it in your programming language of choice using the Temporal SDK. +Conceptually, a Workflow specifies a sequence of steps and orchestrates the execution of Activities. + +**[Activities](/activities)**: An Activity is a method or function that encapsulates business logic prone to failure (for example, calling a service that may go down). +The system can automatically retry these Activities upon some failures. +Activities perform a single, well-defined action, such as calling another service, transcoding a media file, or sending an email message. + +**[Standalone Activities](/standalone-activity)**: A Standalone Activity is a top-level [Activity Execution](/activity-execution) started directly by a [Client](/encyclopedia/temporal-client), without using a Workflow. Use a [Workflow](/workflows) to orchestrate multiple Activities, but if you just need to execute a single Activity, use a [Standalone Activity](/standalone-activity). Standalone Activities are Temporal's job queue. + +**[Workers](/workers)**: A Worker executes your Workflow and Activity code. + +## Resources + +Follow one of our [tutorials](https://learn.temporal.io/getting_started/) to develop Workflows and Activities and run them in Worker Processes, or enroll in one of [our courses](https://learn.temporal.io/courses/). + +Read the Temporal Encyclopedia pages for each core primitive: + +- [Temporal Workflows](/workflows) +- [Temporal Activities](/activities) +- [Temporal Standalone Activities](/standalone-activity) +- [Temporal Workers](/workers) + +Or jump straight to a Temporal SDK develop docs: + + diff --git a/docs/evaluate/features/data-encryption.mdx b/docs/evaluate/features/data-encryption.mdx new file mode 100644 index 0000000000..e187073bb1 --- /dev/null +++ b/docs/evaluate/features/data-encryption.mdx @@ -0,0 +1,115 @@ +--- +id: data-encryption +title: Data encryption +description: Payload Codecs encrypt Workflow inputs, outputs, and Signals before they reach the Temporal Service, so plaintext stays on hosts you control. +sidebar_label: Data encryption +tags: + - Codec Server + - Security + - Encryption + - Workflows +--- + +import PatternCards from '@site/src/components/PatternCards'; + +The Temporal Service persists what your Workflows send it. +Workflow inputs and results, Activity results, Signal and Query payloads, and memos are all recorded in the [Event History](/workflow-execution/event#event-history) and stay there for the length of the Namespace [Retention Period](/temporal-service/temporal-server#retention-period). + +A [Payload Codec](/payload-codec) encrypts those Payloads before they leave your process. +The Service stores ciphertext, and the data exists unencrypted only on the Clients and Workers you run, on hosts you control. +Temporal ships no default codec: the default [Data Converter](/dataconversion) serializes to JSON without encrypting, so encryption is something you add. + +Encrypted Payloads are unreadable in the Web UI and CLI, which is what a [Codec Server](/codec-server) is for. +It's an HTTP server you run that holds the same decode logic as your codec. +The Web UI and CLI send Payloads to it and display what it returns, so decrypted values reach the browser and the terminal only. The copy on the Temporal Service stays encrypted. + +## What you operate + +Encryption is opt-in, and each piece of it is yours to run: + +- **The codec.** You choose the cipher and write the `encode` and `decode` logic. Temporal doesn't hold or generate your keys. +- **Key distribution.** Your Workers and your Codec Server need the same keys, which usually means [key management](/key-management) infrastructure you already have or have to stand up. +- **The Codec Server.** You host it, secure it, and control access to it. Because it decodes sensitive data through a single API call, restrict it by putting it behind a VPN or adding authentication if it's reachable from the internet. It also needs [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) enabled to answer the Web UI. + +Where the endpoint gets configured depends on where the Temporal Service runs: + +- **Temporal Cloud.** A [Namespace Admin](/cloud/manage-access/roles-and-permissions#namespace-level-permissions) sets the Codec Server endpoint on the Namespace, which enables it for everyone on that Namespace. Cloud can pass a JWT access token with each request so your server can decide, per user, whether to return plaintext. +- **Self-hosted.** The endpoint is set for the whole Temporal Service, though one Codec Server can route per Namespace. You configure Web UI authorization yourself. + +Expect the Web UI to send several requests per Workflow Execution, and expect the round trip to add latency when someone views an Event History. + +## What a codec doesn't cover + +- **Search Attributes** are persisted unencoded so the Visibility store can index them. Anything you need to search on is readable by the Service, so keep sensitive values out of [Search Attributes](/search-attribute) and in encrypted Payloads. +- **Failure messages and stack traces** aren't encoded as codec-capable Payloads by default. Encoding them is an explicit opt-in through the [Failure Converter](/failure-converter). +- **Payloads above the Service size limit** still need [External Storage](/external-storage), whether or not they're encrypted. +- **Nexus Operations** pass through the Data Converter like any other Payload, so caller and handler Workers need compatible converters. See [Nexus security](/nexus/security#payload-encryption-data-converter). + +For how converters and codecs work, see the Encyclopedia pages on [data conversion](/dataconversion). +For setting up and securing a Codec Server, see [Codecs and encryption](/production-deployment/data-encryption). + +## Resources + + + +Or jump straight to the SDK feature guide for implementation details: + + diff --git a/docs/evaluate/features/index.mdx b/docs/evaluate/features/index.mdx new file mode 100644 index 0000000000..01480c3fae --- /dev/null +++ b/docs/evaluate/features/index.mdx @@ -0,0 +1,70 @@ +--- +id: index +title: Temporal development and production features +description: Leverage a Temporal SDK to develop robust applications featuring Workflows, Activities, Workers, testing suites, Temporal Clients, Scheduled Workflows, and advanced observability tools. +sidebar_label: Features +--- + +import PatternCards from '@site/src/components/PatternCards'; + +Through a Temporal SDK, Temporal provides a wide range of features that enable developers to build applications that serve a wide range of use cases. + + + +Temporal also provides these features: + +- **Runtime safeguards**: Prevent avoidable errors and issues from executing during runtime. +- **Versioning**: Support multiple versions of your business logic for long-running business processes. + +For detailed information on Temporal feature release stages and criteria, see this [Product Release Stages Guide](/evaluate/product-release-stages). diff --git a/docs/evaluate/features/job-queue.mdx b/docs/evaluate/features/job-queue.mdx new file mode 100644 index 0000000000..125a69c0f0 --- /dev/null +++ b/docs/evaluate/features/job-queue.mdx @@ -0,0 +1,98 @@ +--- +id: job-queue +title: Job queues +sidebar_label: Job queues +description: Run background jobs as Standalone Activities with durable retries, timeouts, priority and fairness dispatch, and per-job visibility without a Workflow. +tags: + - Activities + - Standalone Activities +--- + +import PatternCards from '@site/src/components/PatternCards'; + +A job is a single, discrete unit of work that runs asynchronously in the background such as sending an email, processing a webhook, syncing data, or executing a single function reliably. + +A job queue is the system that manages these jobs: accepting work, dispatching it to workers, retrying on failure, and providing visibility into what's running and what failed. + +**[Standalone Activities](/standalone-activity) are Temporal's job queue.** + +They let you use Temporal Activities as background jobs, in addition to using the same Activities as steps inside a Workflow. You write an Activity once and can run it either as a background job or as part of a multi-step Workflow. + +Under the hood, Standalone Activities use Temporal's [Task Queues](/task-queue) for dispatching work to Workers. + +## What you get that a queue library doesn't give you + +Each job is a durably persisted [Activity Execution](/activity-execution), not a message in a broker you also have to run. + +That changes four things a job queue usually leaves to you: + +- **Delivery semantics you choose.** At-least-once by default, with a [Retry Policy](/encyclopedia/retry-policies), timeouts, and exponential backoff enforced by the Temporal Service. Set retry maximum attempts to 1 for at-most-once. +- **Addressable jobs.** Every job has an Activity Id and Run Id. Use them to fetch the result, cancel, or terminate a specific job, rather than searching a log for it. +- **Deduplication at submit time.** A conflict policy and a reuse policy decide what happens when a job with the same Id is already running or has already run, so a retried submit doesn't create a second job. +- **Dispatch under load.** Jobs carry priority and fairness weights, and a slow job doesn't block dispatch of the ones behind it. + +For queries, `temporal activity list` and [List Filters](/list-filter) search Executions by type, status, and Task Queue, and standard [Activity metrics](/cloud/metrics/openmetrics/metrics-reference#activity-metrics) cover scheduled, started, completed, failed, timed out, and canceled counts. + +## When to use a Standalone Activity instead of a Workflow + +Use a Standalone Activity to run **one** Activity. Use a [Workflow](/workflows) to orchestrate **several**, or to hold state between steps. + +Running a single Activity as a Standalone Activity rather than wrapping it in a Workflow costs fewer [Billable Actions](/cloud/actions-usage#actions-in-workflows) on Temporal Cloud, and for short jobs it's lower latency, because there are fewer Worker round-trips. + +You don't have to decide up front. The same Activity Function runs both ways with no code changes, so a job that later becomes one step of a longer process moves into a Workflow without a rewrite. + +## What you still operate + +Temporal doesn't replace your compute. You run and scale the Workers that poll [Task Queues](/task-queue) and execute the Activities; the Temporal Service handles persistence, dispatch, retries, and timeouts. + +Long jobs also stay your responsibility to instrument: heartbeats are optional, and without them a job that dies mid-run isn't detected until its Start-To-Close Timeout expires. + +## Public Preview limitations + +Standalone Activities are in [Public Preview](/evaluate/product-release-stages#public-preview), which affects what you can do to a job in flight: + +- Pause, unpause, reset, and update are not supported yet. Cancel and terminate are. +- The `TerminateExisting` conflict policy and `TerminateIfRunning` reuse policy are not supported yet. + +## Resources + +Read about [Standalone Activity concepts, features, and limitations](/standalone-activity), or jump to a language-specific quickstart: + + diff --git a/docs/evaluate/features/observability.mdx b/docs/evaluate/features/observability.mdx new file mode 100644 index 0000000000..fbc7f82573 --- /dev/null +++ b/docs/evaluate/features/observability.mdx @@ -0,0 +1,135 @@ +--- +id: observability +title: Observability +description: Query live and closed Workflow Executions by your own business identifiers, export Prometheus-compatible metrics, and trace Executions across Worker processes. +sidebar_label: Observability +tags: + - Observability + - Metrics + - Logging + - Visibility +--- + +import PatternCards from '@site/src/components/PatternCards'; + +Temporal records every Workflow Execution as a durable [Event History](/workflow-execution/event#event-history): the inputs, every Activity result, every timer, and every message, in order. +Logs and metrics tell you what a process reported while it was running. +The Event History lets you replay what a Workflow actually did, including one that finished last week. + +Around that history, Temporal gives you three things you would otherwise assemble yourself. + +## Query Executions by your own identifiers + +[Visibility](/visibility) indexes running and closed Workflow Executions so you can list, filter, and count them with a SQL-like [List Filter](/list-filter). +[Custom Search Attributes](/search-attribute#custom-search-attribute) put your own identifiers into that index like, an order Id, customer, region, or tier. +An operator can then answer "which orders are stuck in payment retry" from the [Web UI](/web-ui) or the [CLI](/cli), without querying your application database. + +Visibility is a search index that Temporal updates asynchronously, so a List or Count query can return results that are a few seconds stale. +It's built for finding Executions across many, not for reading the authoritative state of one. + +## Metrics from both sides of the connection + +Temporal emits two independent, Prometheus-compatible metric sets, and you need both: + +- **[SDK metrics](/references/sdk-metrics)** come from your Workers and Clients: task slot availability, Schedule-To-Start latency, Activity failures. They tell you whether your Workers are keeping up with the work. +- **Temporal Service metrics** come from the Service: request rates, latencies, and errors. On Temporal Cloud these stream from the [OpenMetrics endpoint](/cloud/metrics/openmetrics) into Datadog, Grafana Cloud, New Relic, or your own Prometheus. Self-hosted deployments scrape [Temporal Service metrics](/references/cluster-metrics) directly. + +Watching one side alone hides the most common failure mode: the Service is accepting and serving work normally while Tasks pile up in a Task Queue because the Workers are under-provisioned. + +## Tracing and logs that survive process boundaries + +A Workflow Execution can span days, several Activities, and multiple Worker restarts, which is where hand-rolled tracing usually loses the thread. +Temporal SDKs ship OpenTelemetry interceptors that propagate trace context from the Client into the Workflow and out to each Activity, across Worker processes, so one trace covers the whole Execution. + +SDKs also expose a logger for Workflow and Activity code that suppresses duplicate output during replay, so a retried or resumed Workflow doesn't repeat every log line it already emitted. + +## What you operate + +What you run yourself depends on where the Temporal Service runs: + +- **Temporal Cloud.** Visibility is enabled by default, and metrics come from the OpenMetrics endpoint. There's no Visibility store to size or upgrade. Both the [number of custom Search Attributes](/cloud/limits#number-of-custom-search-attributes) and the [Visibility API rate limit](/cloud/limits#visibility-api-rate-limit) are scoped per Namespace. +- **Self-hosted.** You choose and operate the [Visibility store](/self-hosted-guide/visibility): MySQL v8.0.17+ or PostgreSQL v12+ on Temporal Server v1.20 and later, or Elasticsearch and OpenSearch. [Dual Visibility](/dual-visibility) covers migrating between them without downtime. + +On both, the Namespace [Retention Period](/temporal-service/temporal-server#retention-period) bounds how long closed Workflow Executions stay queryable. To keep Event Histories past that window, configure [Archival](/temporal-service/archival). + +## Resources + + + +Or jump straight to the SDK feature guide for implementation details: + + diff --git a/docs/evaluate/features/schedules.mdx b/docs/evaluate/features/schedules.mdx new file mode 100644 index 0000000000..16ae3ec8d4 --- /dev/null +++ b/docs/evaluate/features/schedules.mdx @@ -0,0 +1,121 @@ +--- +id: schedules +title: Schedules +description: A Schedule starts Workflows on an interval or calendar expression, with Overlap Policy, Catchup Window, backfill, and pause controls the Temporal Service runs for you. +sidebar_label: Schedules +tags: + - Schedules + - Workflows +--- + +import PatternCards from '@site/src/components/PatternCards'; + +A [Schedule](/schedule) starts a [Workflow Execution](/workflow-execution) at times you define: on an interval, on a calendar expression, or on a combination of both. + +A Schedule is its own object in the Temporal Service with its own Id, separate from the Workflow Executions it starts. +You can update, pause, backfill, or trigger it without changing or redeploying the Workflow code it runs. + +That separation is what you get instead of running a scheduler alongside your application. +There's no second system to deploy, monitor, and reconcile with your Workers, and every start the Schedule makes is an ordinary Workflow Execution with the same durability, retries, and [Event History](/workflow-execution/event#event-history) as one you start by hand. + +## What a Schedule controls + +- **Spec.** When Actions happen: an interval (`45m`, or `6h/5h` for every six hours offset into the fifth hour) or a calendar expression, given as a cron string (`0 8 * * 1-5`, weekdays at 8:00 UTC) or as JSON with named fields (`{"dayOfMonth": "1,15", "hour": "11-14"}`). One Spec can combine several of each and add start and end times, exclusions, jitter, and a time zone. Exclusions and embedded time zone data are available through the SDKs and API, but not the CLI or Web UI. +- **[Overlap Policy](/schedule#overlap-policy).** What happens when it's time to start and the previous Execution is still running: `Skip` (the default), `BufferOne`, `BufferAll`, `CancelOther`, `TerminateOther`, or `AllowAll`. +- **[Catchup Window](/schedule#catchup-window).** Which missed Actions to take when the Temporal Service was unavailable at the scheduled time. The default is one year; the minimum is ten seconds. +- **[Pause-on-failure](/schedule#pause-on-failure).** Pause the Schedule automatically when a scheduled Execution ends in failure or timeout. +- **[Backfill](/schedule#backfill).** Run every Action for a past time range now, including a range from before the Schedule existed. +- **[Action limit](/schedule#limit-number-of-actions).** Stop after a set number of scheduled Actions, after which the Schedule behaves as paused. + +Every Execution a Schedule starts carries the `TemporalScheduledStartTime` and `TemporalScheduledById` [Search Attributes](/search-attribute), so you can query scheduled runs with a [List Filter](/list-filter) the same way you query anything else. + +## What a Schedule doesn't do + +- **Pausing a Schedule doesn't pause what's already running.** It stops future Actions. Executions the Schedule already started keep going. +- **A Paused Workflow Execution still counts as running.** When the Schedule evaluates its Overlap Policy, a Paused Execution is an open Execution, so `Skip` skips and `BufferOne` buffers behind it. See [Interaction with Workflow Pause](/schedule#workflow-pause). +- **Listing Schedules is eventually consistent.** `ListSchedules` and `CountSchedules` are served by [Visibility](/visibility#operations-that-use-visibility) and share its rate limit, so a Schedule you just created or deleted may not appear right away. + +## How to choose between a Schedule, a Cron Job, and Start Delay + +- **Use a Schedule when the same Workflow has to run more than once.** It's the right choice as soon as you need to pause the series during an incident, change the timing without a deploy, or run the Actions an outage skipped. Use it for new applications even when the timing is a plain cron expression, because you get those controls whether or not you need them yet. +- **Use [Start Delay](/workflow-execution/timers-delays#delay-workflow-execution) when there's exactly one run, at a time you know when you start it.** A trial expiry, a cancellation deadline, a reminder. It isn't recurring, and it's incompatible with both Schedules and Cron Jobs, so it's not a way to hold off the first Action of a Schedule. Set a start time on the Schedule Spec for that. +- **Keep a [Temporal Cron Job](/cron-job) if you have one running, but don't write new ones.** A cron string is a property of the Workflow Execution rather than a separate object, so the next Run starts only after the current one closes, and changing or stopping the series means terminating the Workflow. A Schedule covers the same cases and lets you update it in place. + +If the waiting happens inside a Workflow that's already running, none of these apply. Use a [Timer](/workflow-execution/timers-delays#timer). + +## Resources + + + +Or jump straight to the SDK feature guide for implementation details: + + diff --git a/docs/evaluate/development-production-features/serverless-workers/index.mdx b/docs/evaluate/features/serverless-workers/index.mdx similarity index 99% rename from docs/evaluate/development-production-features/serverless-workers/index.mdx rename to docs/evaluate/features/serverless-workers/index.mdx index 5e2467ff06..3f910cf390 100644 --- a/docs/evaluate/development-production-features/serverless-workers/index.mdx +++ b/docs/evaluate/features/serverless-workers/index.mdx @@ -1,7 +1,6 @@ --- id: index title: Serverless Workers -slug: /evaluate/serverless-workers description: Understand the benefits of Serverless Workers and when to use them. Run Temporal Workers on serverless compute with no infrastructure to manage. diff --git a/docs/evaluate/features/temporal-nexus.mdx b/docs/evaluate/features/temporal-nexus.mdx new file mode 100644 index 0000000000..8e9c498dad --- /dev/null +++ b/docs/evaluate/features/temporal-nexus.mdx @@ -0,0 +1,138 @@ +--- +id: nexus +title: Temporal Nexus +description: Nexus connects Temporal Applications across Namespace, team, and region boundaries. +sidebar_label: Temporal Nexus +tags: + - Nexus + - Namespaces + - Workflows + - Temporal Cloud +--- + +import PatternCards from '@site/src/components/PatternCards'; +import { CaptionedImage } from '@site/src/components'; + +**[Temporal Nexus](/nexus)** connects Temporal Applications across isolated Namespaces, regions, and clouds. +Each team keeps its own Namespace, Workers, and deployment lifecycle, and exposes a service contract that other teams call with the same durability, observability, and access control as the rest of Temporal. +Callers get a durable, atomic handoff instead of a network call they have to make reliable themselves. +Watch the [Nexus overview](https://www.youtube.com/watch?v=tJ1OwSFokOg&t=117s) for a walkthrough. + +## When to use Nexus {/* #should-i-use-nexus */} + +Use Nexus when a business process crosses a boundary you put in place on purpose: + +- **Separate teams or domains** - Each team owns its Namespace, Workers, and release cadence, and shares capability through a service contract instead of shared internals. +- **Security and fault isolation** - Grant access to a Nexus Endpoint rather than to a whole Namespace. A misbehaving Worker affects its own Namespace, not its callers. +- **Multiple regions or clouds** - Temporal Cloud routes Nexus requests across Namespaces in AWS and GCP over a global mTLS-secured mesh. +- **Compliance and data residency** - Isolated Namespaces keep sensitive data (PCI, PII) under their own encryption, access controls, and audit trail. +- **Shared internal services** - A registered Endpoint is discoverable, so teams can adopt an existing service instead of rebuilding it. + +Use the following decision tree to help determine if Nexus is right for your use case: + +
+ +
+ +## When not to use Nexus + +- **One team in one Namespace** - [Child Workflows](/evaluate/features/child-workflows) and [Activities](/activities) already compose work inside a Namespace, and an Endpoint is one more thing to register and operate. If you expect to split into separate Namespaces later, Nexus is still worth adopting now. It separates the contract from the implementation, so the migration is mostly configuration. +- **Synchronous calls that can't finish fast** - A [Synchronous Operation](/nexus/operations#operation-lifecycle) has to complete within the 10-second handler deadline. Anything slower or less predictable belongs in an Asynchronous Operation. + +### Nexus, Child Workflows, or Activities? + +Connecting Namespaces without Nexus is possible, but each option costs you something: + +- **Child Workflows** are limited to the same Namespace. Using them across Namespaces leaks implementation details because the caller has to manage the target Namespace, Task Queue, and Workflow options. +- **Activity wrappers** need a per-target mTLS client, so you take on configuration and certificate management. They tend to be over-permissioned, have no built-in cross-Namespace observability, and need error-prone boilerplate for asynchronous results. +- **A gateway service** is not durable, is hard to debug across services, and is one more service to run and patch. + +Nexus replaces all three with a contract between caller and handler, less code, and first-class observability. + +## Limits to plan for + +- Nexus is available in the Go, Java, Python, TypeScript, .NET, and Rust SDKs. PHP and Ruby don't support it. +- A Synchronous Operation must complete within a [10-second handler deadline](/cloud/limits#nexus-operation-request-timeout). An Asynchronous Operation has a [maximum ScheduleToClose duration of 60 days](/cloud/limits#nexus-operation-duration-limits). +- A Workflow Execution can have 30 in-flight Nexus Operations at a time, and a handler Workflow accepts 2,000 callbacks, which sets how many callers can attach to it. +- Temporal Cloud defaults to 100 Nexus Endpoints per Account and 1,000 caller Namespaces per Endpoint. Support can raise both. +- The global Nexus Registry, runtime access controls, audit logging, and cross-region routing are Temporal Cloud features. On a self-hosted Temporal Service, you enable the HTTP API and Nexus dynamic configuration yourself, and external Nexus calls are still experimental. + +See [Nexus limits](/cloud/nexus/limits) for the full set. + +## How teams use Nexus + +- **Duolingo** uses Nexus for self-service infrastructure ([case study](https://temporal.io/resources/case-studies/duolingo-temporal-nexus) | [webinar](https://www.youtube.com/watch?v=tJ1OwSFokOg&t=524s)). +- **Netflix** uses it to orchestrate infrastructure across teams ([Replay talk](https://www.youtube.com/watch?v=izR9dQ_eIe4&t=470s) | [webinar](https://www.youtube.com/watch?v=At1FfqGQiu0&t=1295s)). +- **Miro** uses it for cross-region data migration ([Replay talk](https://youtu.be/YLmFR-IAC3M?feature=shared&t=1488)). + +For more architectural patterns built on Temporal, see [use cases and design patterns](/evaluate/use-cases-design-patterns). + +## Resources {/* #learn-more */} + +Join the [#nexus](https://temporalio.slack.com/archives/C07LQN0JK9B) channel in [Temporal Slack](https://t.mp/slack) to connect with the Nexus community. + +Read the Temporal Encyclopedia for conceptual depth: + +- [How Nexus works](/nexus) +- [Nexus Security](/nexus/security) +- [Nexus Patterns](/nexus/patterns) + +Or jump straight to an SDK quick start: + + + +Then set up Nexus on the deployment you run: + + diff --git a/docs/evaluate/features/timeouts-and-retries.mdx b/docs/evaluate/features/timeouts-and-retries.mdx new file mode 100644 index 0000000000..f5b475dde1 --- /dev/null +++ b/docs/evaluate/features/timeouts-and-retries.mdx @@ -0,0 +1,173 @@ +--- +id: timeouts-and-retries +title: Timeouts and Retry Policies +description: Detect Workflow and Activity failures with timeouts, then mitigate them with automatic retries. Configuration guides for every Temporal SDK. +sidebar_label: Timeouts and retries +tags: + - Workflows + - Activities + - Timeouts + - Failures + - Errors +--- + +import PatternCards from '@site/src/components/PatternCards'; + +In Temporal, timeouts detect application failures. +The system can then automatically mitigate these failures through retries. +Both major application function primitives, **[Workflows](/workflows)** and **[Activities](/activities)**, have dedicated **timeout configurations** and can be configured with a **[Retry Policy](/encyclopedia/retry-policies)**. + +Follow one of our tutorials to [Get started](https://learn.temporal.io/getting_started/) exploring timeouts and Retry Policies. + +## Workflow timeouts + +Each Workflow timeout limits a different aspect of a [Workflow Execution](/workflow-execution), and you set them when you start the Workflow Execution. + +- **[Workflow Execution Timeout](/encyclopedia/detecting-workflow-failures#workflow-execution-timeout)**: the maximum time a Workflow Execution can stay Open, including retries and any use of [Continue-As-New](/workflow-execution/continue-as-new). The default is infinite. +- **[Workflow Run Timeout](/encyclopedia/detecting-workflow-failures#workflow-run-timeout)**: the maximum duration of a single [Workflow Run](/workflow-execution/workflowid-runid#run-id), which excludes retries and Continue-As-New. The default matches the Workflow Execution Timeout. +- **[Workflow Task Timeout](/encyclopedia/detecting-workflow-failures#workflow-task-timeout)**: the maximum time a [Worker](/workers#worker) has to execute a [Workflow Task](/tasks#workflow-task) after picking it up from the [Task Queue](/task-queue). The default is 10 seconds, with a maximum of 120 seconds. + +Workflows are built to run for long periods and to survive failures, so most applications don't need a Workflow Execution Timeout or Workflow Run Timeout. +A timeout limits how long a Workflow can absorb delays. To act after a set period inside a Workflow, use a [Timer](/workflow-execution/timers-delays) instead. +Workflow Execution and Workflow Run Timeouts are most often used to bound a [Temporal Cron Job](/cron-job). + +Set Workflow timeouts and Retry Policies in your language: + + + +## Activity timeouts + +Activity timeouts tell a Workflow which kind of Activity failure occurred, and the Activity's [Retry Policy](/encyclopedia/retry-policies) decides what happens next. + +- **[Schedule-To-Start Timeout](/encyclopedia/detecting-activity-failures#schedule-to-start-timeout)**: the maximum time an [Activity Task](/tasks#activity-task) can sit in the Task Queue before a Worker picks it up. The default is infinite, and this timeout never triggers a retry, because a retry would return the Activity Task to the same Task Queue. +- **[Start-To-Close Timeout](/encyclopedia/detecting-activity-failures#start-to-close-timeout)**: the maximum time for a single [Activity Task Execution](/tasks#activity-task-execution). The default matches the Schedule-To-Close Timeout. +- **[Schedule-To-Close Timeout](/encyclopedia/detecting-activity-failures#schedule-to-close-timeout)**: the maximum time for the whole [Activity Execution](/activity-execution), from the first Activity Task being scheduled to the last one closing. The default is infinite. +- **[Heartbeat Timeout](/encyclopedia/detecting-activity-failures#heartbeat-timeout)**: the maximum time between [Activity Heartbeats](/encyclopedia/detecting-activity-failures#activity-heartbeat), the pings a Worker sends to report that an Activity Execution is still making progress. + +Every Activity Execution needs either a Start-To-Close or a Schedule-To-Close Timeout. +Set Start-To-Close: the [Temporal Service](/temporal-service) can't tell when a Worker crashes or loses contact, so it relies on this timeout to retry the Activity. +Long-running Activities should also Heartbeat and set a Heartbeat Timeout, which detects a lost Worker sooner than a long Start-To-Close Timeout can. + +Set Activity timeouts and Retry Policies in your language: + + + +## Resources + +For a deep dive into timeouts and Retry Policies visit the following Temporal Encyclopedia pages or enroll in one of [our courses](https://learn.temporal.io/courses/). + + diff --git a/docs/evaluate/features/workflow-message-passing.mdx b/docs/evaluate/features/workflow-message-passing.mdx new file mode 100644 index 0000000000..cf1221bb2b --- /dev/null +++ b/docs/evaluate/features/workflow-message-passing.mdx @@ -0,0 +1,153 @@ +--- +id: workflow-message-passing +title: Workflow message passing +description: Signals write to a running Workflow without waiting, Queries read its current state, and Updates do both and return a result to the caller. +sidebar_label: Workflow message passing +tags: + - Signals + - Queries + - Updates + - Workflows +--- + +import PatternCards from '@site/src/components/PatternCards'; + +A running [Workflow Execution](/workflow-execution) can receive messages from outside itself. +Its message handlers act on the Workflow's current state, which makes a Workflow behave like a stateful service with its own endpoints. +Temporal has three message types: **Signals** are asynchronous write requests, **Queries** are read requests, and **Updates** are synchronous write requests that return a result. + +Each one fits a different job: + +- Your shipment-tracking Workflow needs to know when an item leaves the warehouse. **Signal** the Workflow when the driver scans the barcode. +- Your team wants to track the progress of a data migration. **Query** the running batch Workflow for the numbers behind a progress bar. +- Your shopping cart Workflow needs to add an item and render the cart. **Update** it to add the item and get the current contents back in the same call. + +## Choose a message type + +| | Signal | Query | Update | +| ------------------------------------------------------ | ----------------- | ----- | ------------------- | +| Reads Workflow state | No | Yes | Yes | +| Changes Workflow state | Yes | No | Yes | +| Caller waits for the handler | No | Yes | Yes | +| Returns a value to the caller | No | Yes | Yes | +| Recorded in the [Event History](/workflow-execution/event#event-history) | Yes | No | Yes, once accepted | +| Handler can block | Yes | No | Yes | + +For **write requests**, the choice is whether the caller needs to know the outcome. +Send a Signal when the caller can move on without a result and shouldn't depend on a Worker being available to accept the request. +Send an Update when the caller needs a result or an error, wants low end-to-end latency, or should be rejected up front by a validator before the request enters the Workflow's Event History. + +For **read requests**, start with a Query. +Queries never add Events to the Event History, and they work against completed Workflow Executions. +Because a Query handler cannot block, reading a value that only exists once the Workflow reaches a certain state means either polling with Queries or writing the read as an Update, which is more efficient but does write to the Event History. + +For **combined read and write requests**, use an Update. +If the request has to be asynchronous, send a Signal and poll with a Query. + +To stream a sequence of events out of a Workflow rather than answer a single request, see [Workflow Streams](/workflow-streams). + +## When not to use a message + +- **To change state from a Query.** A Query handler can inspect Workflow state but must not mutate it. Use a Signal or an Update. +- **To carry data that's known at start time.** Pass it as a Workflow argument instead of sending a message after the Workflow starts. +- **To reach a Child Workflow from inside a Workflow.** Send Updates from an Activity using a Temporal Client, not from Workflow code. +- **For high fan-in with Updates.** A Workflow Execution can have only a small number of Updates in flight at once, while Signals have no equivalent per-message concurrency cap. See [Limits to plan for](#limits-to-plan-for). +- **To stop a Workflow.** Cancellation and Termination are their own operations. See [Cancellation and Termination](/evaluate/features/cancellation-and-termination). + +## Send a message and start a Workflow in one call + +Both write types have a variant that starts a Workflow Execution if one isn't already running under the given [Workflow Id](/workflow-execution/workflowid-runid): + +- **[Signal-With-Start](/sending-messages#signal-with-start)** Signals a running Workflow Execution, or starts one and immediately Signals it. The operation is atomic, which makes it a way to lazily initialize a Workflow. +- **[Update-With-Start](/sending-messages#update-with-start)** sends an Update and starts the Workflow if needed, in a single round trip, and requires a [Workflow Id conflict policy](/workflow-execution/workflowid-runid#workflow-id-conflict-policy). Unlike Signal-With-Start it is not atomic: the SDK retries the request, but the Update is not guaranteed to succeed. Self-hosted deployments should run [Temporal Server v1.28](https://github.com/temporalio/temporal/releases/tag/v1.28.0) or later. + +## Limits to plan for + +These figures are for Temporal Cloud. Self-hosted deployments configure their own, starting from the [self-hosted defaults](/self-hosted-guide/defaults). + +- A Workflow Execution can receive up to 10,000 Signals. It stops processing Signals after that. +- A Workflow Execution can have at most 10 in-flight Updates, and 2,000 Updates total in its Event History. +- A Workflow Execution can have at most 2,000 incomplete `SignalExternalWorkflowExecution` Commands at a time, which bounds how many Signals it can send to other Workflows at once. +- A single request payload is capped at 2 MB, and any one Event History transaction at 4 MB. Offload larger payloads to [External Storage](/external-storage). + +See [System limits](/cloud/limits) for the full set. + +## Resources + +For conceptual depth on the three message types, read the Temporal Encyclopedia or enroll in one of [our courses](https://learn.temporal.io/courses/interacting_with_workflows). + + + +Or jump straight to the SDK feature guide for implementation details: + + diff --git a/docs/evaluate/index.mdx b/docs/evaluate/index.mdx index e134849e88..c6d397c59a 100644 --- a/docs/evaluate/index.mdx +++ b/docs/evaluate/index.mdx @@ -15,7 +15,7 @@ Applications benefit from fault-tolerance and execution guarantees. Thousands of companies of all sizes are leveraging Temporal's capabilities for both mission critical and standard workloads. - [Why Temporal](/evaluate/why-temporal) -- [Development and production features](/evaluate/development-production-features) +- [Development and production features](/evaluate/features) - [Use cases](/evaluate/use-cases-design-patterns) - [Temporal Cloud](/cloud) - [Security](/security) diff --git a/docs/evaluate/development-production-features/release-stages.mdx b/docs/evaluate/product-release-stages.mdx similarity index 96% rename from docs/evaluate/development-production-features/release-stages.mdx rename to docs/evaluate/product-release-stages.mdx index d4a112cb0f..ead397edff 100644 --- a/docs/evaluate/development-production-features/release-stages.mdx +++ b/docs/evaluate/product-release-stages.mdx @@ -1,8 +1,8 @@ --- -id: release-stages -title: Temporal product release stages guide +id: product-release-stages +title: Temporal product release stages sidebar_label: Product release stages -description: Discover Temporal's Product Release Stages Guide for detailed criteria on Pre-release, Public Preview, and General Availability. Make informed decisions on feature adoption! +description: Pre-release, Public Preview, and General Availability compared by feature access, API stability, support, pricing, and regional coverage. toc_max_heading_level: 4 tags: - Temporal diff --git a/docs/evaluate/temporal-cloud/service-availability.mdx b/docs/evaluate/temporal-cloud/service-availability.mdx index 00599d030e..17c8662811 100644 --- a/docs/evaluate/temporal-cloud/service-availability.mdx +++ b/docs/evaluate/temporal-cloud/service-availability.mdx @@ -61,3 +61,18 @@ Latency over a week-long period for starting and signaling Workflow Executions w Latency observed from the Temporal Client is influenced by other system components like the Codec Server, egress proxy, and the network itself. Also, concurrent operations on the same Workflow Execution may result in higher latency. + +### Custom persistence layer + +Temporal Cloud runs a custom persistence layer rather than the persistence stores available to self-hosted deployments. +Three components of that layer account for most of the difference in latency: + +- **Sharding:** Distributes load across multiple databases and resizes them independently, so a traffic spike in one shard doesn't become a bottleneck for the rest. +- **Write-ahead log (WAL):** Batches updates in an append-only log before writing them to the database, which reduces write latency and database size. +- **Tiered storage of Event History:** Moves the Event History of closed Workflow Executions to cheaper storage, which keeps the primary database smaller and faster for running Executions. + +## Related + +- [Higher throughput and lower latency: Temporal Cloud's custom persistence layer](https://temporal.io/blog/higher-throughput-and-lower-latency-temporal-clouds-custom-persistence-layer): How sharding, the write-ahead log, and tiered storage are built. +- [Benchmarking latency: Temporal Cloud vs. self-hosted Temporal](https://temporal.io/blog/benchmarking-latency-temporal-cloud-vs-self-hosted-temporal): Measured comparison of the two deployment options. +- [Replay conference talk: Custom persistence layer](https://www.youtube.com/watch?v=SQv9ot-jB6o&list=PLl9kRkvFJrlREHL7fiEKBWTp5QuFeYS2r&index=5): Walkthrough of the persistence design. diff --git a/docs/glossary.md b/docs/glossary.md index 5e3913d684..1f9ab4ec4a 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -253,7 +253,7 @@ responsible for rate limiting, authorizing, validating, and routing all inbound -#### [General Availability](/evaluate/development-production-features/release-stages#general-availability) +#### [General Availability](/evaluate/product-release-stages#general-availability) Learn more about the General Availability release stage @@ -474,13 +474,13 @@ A Payload Converter serializes data, converting objects or values to bytes and b -#### [Pre-release](/evaluate/development-production-features/release-stages#pre-release) +#### [Pre-release](/evaluate/product-release-stages#pre-release) Learn more about the Pre-release stage -#### [Public Preview](/evaluate/development-production-features/release-stages#public-preview) +#### [Public Preview](/evaluate/product-release-stages#public-preview) Learn more about the Public Preview release stage diff --git a/docs/production-deployment/self-hosted-guide/checklist.mdx b/docs/production-deployment/self-hosted-guide/checklist.mdx index 2d8de3c604..bad57d1788 100644 --- a/docs/production-deployment/self-hosted-guide/checklist.mdx +++ b/docs/production-deployment/self-hosted-guide/checklist.mdx @@ -15,7 +15,7 @@ This page covers common challenges you'll face when self-hosting Temporal for pr :::note -This guide covers self-hosted deployments. If you're weighing self-hosting against a managed offering, see [Temporal Cloud vs. self-hosted Temporal](/evaluate/development-production-features/cloud-vs-self-hosted-features). +This guide covers self-hosted deployments. If you're weighing self-hosting against a managed offering, see [Temporal Cloud vs. self-hosted Temporal](/evaluate/features/cloud-vs-self-hosted-features). ::: diff --git a/docs/production-deployment/self-hosted-guide/temporal-nexus.mdx b/docs/production-deployment/self-hosted-guide/temporal-nexus.mdx index 3200e0e034..d4cc8a4cb9 100644 --- a/docs/production-deployment/self-hosted-guide/temporal-nexus.mdx +++ b/docs/production-deployment/self-hosted-guide/temporal-nexus.mdx @@ -12,7 +12,7 @@ tags: :::info NEW TO NEXUS? -This page explains how to self-host Nexus. To learn about Nexus, see the [how Nexus works page](/nexus). To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/nexus). +This page explains how to self-host Nexus. To learn about Nexus, see the [how Nexus works page](/nexus). To evaluate whether Nexus fits your use case, see the [evaluation guide](/evaluate/features/nexus). ::: diff --git a/docs/quickstarts.mdx b/docs/quickstarts.mdx index ee480861c6..6275cf92d3 100644 --- a/docs/quickstarts.mdx +++ b/docs/quickstarts.mdx @@ -46,7 +46,7 @@ Run an Activity from a Temporal Client without writing a Workflow. /> ### Nexus -Use [Temporal Nexus](/evaluate/nexus) to connect Temporal Applications within and across Namespaces. +Use [Temporal Nexus](/evaluate/features/nexus) to connect Temporal Applications within and across Namespaces.