From 7fc0ed583ce52b8c57c20d0de1bec3c80a83d6da Mon Sep 17 00:00:00 2001 From: rodrigozhou Date: Tue, 26 Nov 2024 15:15:03 -0800 Subject: [PATCH] Add docs for Nexus circuit breaker --- docs/develop/dotnet/index.mdx | 3 +- docs/develop/go/index.mdx | 9 ++--- docs/develop/java/index.mdx | 4 +-- docs/develop/php/index.mdx | 3 +- docs/develop/python/index.mdx | 6 ++-- docs/develop/typescript/index.mdx | 3 +- docs/develop/worker-performance.mdx | 3 +- .../temporal-nexus-service-operations.mdx | 10 ++++++ .../development-production-features/index.mdx | 2 +- .../temporal-nexus.mdx | 36 +++++++++---------- .../temporal-cloud/legacy-pricing.mdx | 7 ++-- .../temporal-cloud/service-availability.mdx | 8 ++--- .../cloud/terraform-provider.mdx | 11 +++--- 13 files changed, 59 insertions(+), 46 deletions(-) diff --git a/docs/develop/dotnet/index.mdx b/docs/develop/dotnet/index.mdx index 71701edefa..ad046f3beb 100644 --- a/docs/develop/dotnet/index.mdx +++ b/docs/develop/dotnet/index.mdx @@ -20,6 +20,7 @@ tags: Build Temporal Applications with the .NET SDK. **Temporal .NET Technical Resources:** + - [.NET API Documentation](https://dotnet.temporal.io/api/) - [.NET SDK Code Samples](https://github.com/temporalio/samples-dotnet) - [.NET SDK GitHub](https://github.com/temporalio/sdk-dotnet) @@ -28,7 +29,7 @@ Build Temporal Applications with the .NET SDK. - [Temporal .NET Community Slack](https://temporalio.slack.com/archives/C012SHMPDDZ) - [.NET SDK Forum](https://community.temporal.io/tag/dotnet-sdk) -::: + ::: ## [Core Application](/develop/dotnet/core-application) diff --git a/docs/develop/go/index.mdx b/docs/develop/go/index.mdx index c60db3fd7f..8b19ed502c 100644 --- a/docs/develop/go/index.mdx +++ b/docs/develop/go/index.mdx @@ -17,15 +17,16 @@ tags: Build Temporal Applications with the Go SDK. **Temporal Go Technical Resources:** + - [Go API Documentation](https://pkg.go.dev/go.temporal.io/sdk) - [Go SDK Code Samples](https://github.com/temporalio/samples-go) - [Go SDK GitHub](https://github.com/temporalio/sdk-go) - **Get Connected with the Temporal Go Community:** +**Get Connected with the Temporal Go Community:** - - [Temporal Go Community Slack](https://temporalio.slack.com/archives/CTDTU3J4T) - - [Go SDK Forum](https://community.temporal.io/tag/go-sdk) - ::: +- [Temporal Go Community Slack](https://temporalio.slack.com/archives/CTDTU3J4T) +- [Go SDK Forum](https://community.temporal.io/tag/go-sdk) + ::: ## [Core Application](/develop/go/core-application) diff --git a/docs/develop/java/index.mdx b/docs/develop/java/index.mdx index 143a2e0955..d9098d4807 100644 --- a/docs/develop/java/index.mdx +++ b/docs/develop/java/index.mdx @@ -11,13 +11,13 @@ tags: - Temporal SDKs --- - ![Java SDK Banner](/img/banner-java-temporal.png) :::info JAVA SPECIFIC RESOURCES Build Temporal Applications with the Java SDK. **Temporal Java Technical Resources:** + - [Java API Documentation](https://javadoc.io/doc/io.temporal/temporal-sdk) - [Java SDK Code Samples](https://github.com/temporalio/samples-java) - [Java SDK GitHub](https://github.com/temporalio/sdk-java) @@ -26,7 +26,7 @@ Build Temporal Applications with the Java SDK. - [Temporal Java Community Slack](https://temporalio.slack.com/archives/CTT84KXK9) - [Java SDK Forum](https://community.temporal.io/tag/java-sdk) -::: + ::: ## [Core application](/develop/java/core-application) diff --git a/docs/develop/php/index.mdx b/docs/develop/php/index.mdx index d100c605ed..2b54a5bf67 100644 --- a/docs/develop/php/index.mdx +++ b/docs/develop/php/index.mdx @@ -17,6 +17,7 @@ tags: Build Temporal Applications with the PHP SDK. **Temporal PHP Technical Resources:** + - [PHP API Documentation](https://php.temporal.io) - [PHP SDK Code Samples](https://github.com/temporalio/samples-php) - [PHP SDK GitHub](https://github.com/temporalio/sdk-php) @@ -25,7 +26,7 @@ Build Temporal Applications with the PHP SDK. - [Temporal PHP Community Slack](https://temporalio.slack.com/archives/C01LK9FAMM0) - [PHP SDK Forum](https://community.temporal.io/tag/php-sdk) -::: + ::: ## [Core Application](/develop/php/core-application) diff --git a/docs/develop/python/index.mdx b/docs/develop/python/index.mdx index 9e81dd8836..489657f42e 100644 --- a/docs/develop/python/index.mdx +++ b/docs/develop/python/index.mdx @@ -17,7 +17,8 @@ tags: Build Temporal Applications with the Python SDK. **Temporal Python Technical Resources:** -- [Python API Documentation](https://python.temporal.io) + +- [Python API Documentation](https://python.temporal.io) - [Python SDK Code Samples](https://github.com/temporalio/samples-python) - [Python SDK Github](https://github.com/temporalio/sdk-python) @@ -25,8 +26,7 @@ Build Temporal Applications with the Python SDK. - [Temporal Python Community Slack](https://app.slack.com/client/TNWA8QCGZ) - [Python SDK Forum](https://community.temporal.io/tag/python-sdk) -::: - + ::: ## [Core Application](/develop/python/core-application) diff --git a/docs/develop/typescript/index.mdx b/docs/develop/typescript/index.mdx index 0edd262b16..b25f6abf53 100644 --- a/docs/develop/typescript/index.mdx +++ b/docs/develop/typescript/index.mdx @@ -17,6 +17,7 @@ tags: Build Temporal Applications with the TypeScript SDK. **Temporal TypeScript Technical Resources:** + - [TypeScript API Documentation](https://typescript.temporal.io) - [TypeScript SDK Code Samples](https://github.com/temporalio/samples-typescript) - [TypeScript SDK GitHub](https://github.com/temporalio/sdk-typescript) @@ -25,7 +26,7 @@ Build Temporal Applications with the TypeScript SDK. - [Temporal TypeScript Community Slack](https://temporalio.slack.com/archives/C01DKSMU94L) - [TypeScript SDK Forum](https://community.temporal.io/tag/typescript-sdk) -::: + ::: ## [Core application](/develop/typescript/core-application) diff --git a/docs/develop/worker-performance.mdx b/docs/develop/worker-performance.mdx index e22dd5c7b6..a1571fe771 100644 --- a/docs/develop/worker-performance.mdx +++ b/docs/develop/worker-performance.mdx @@ -213,7 +213,6 @@ When choosing whether to opt for fixed assignment or resource-based suppliers, c - Reserve auto-tuned resource-based slot suppliers for deployments focused on avoiding Worker overload. They provide excellent balance with built-in throttling that ensures the Worker will be cautious when handing out new executor slots. - The following use cases are particularly well suited to resource-based auto-tuning slot suppliers: - **Fluctuating workloads with low per-Task consumption**: @@ -336,7 +335,7 @@ const workerOptions = { tuner: { tunerOptions: resourceBasedTunerOptions, }, -} +}; // Combining different types const resourceBasedTunerOptions: ResourceBasedTunerOptions = { targetMemoryUsage: 0.8, diff --git a/docs/encyclopedia/temporal-nexus-service-operations.mdx b/docs/encyclopedia/temporal-nexus-service-operations.mdx index 3b4cf2a4f3..63ea64cebc 100644 --- a/docs/encyclopedia/temporal-nexus-service-operations.mdx +++ b/docs/encyclopedia/temporal-nexus-service-operations.mdx @@ -146,6 +146,16 @@ As mentioned above, a synchronous Nexus Operation handler has less than 10 secon Once the caller Workflow schedules an Operation with the caller’s Temporal cluster, the caller’s Nexus Machinery keeps trying to start the Operation, with automatic retries and exponential backoff. If a Nexus Operation returns a [retryable error](https://github.com/temporalio/temporal/blob/13d6cd8cf7a4ba0c4660cf98f672bbd645dca3e7/components/nexusoperations/executors.go#L659) when attempting to start, the Operation it will be retried up to the [default Retry Policy’s](https://github.com/temporalio/temporal/blob/de7c8879e103be666a7b067cc1b247f0ac63c25c/components/nexusoperations/config.go#L111) max attempts and expiration interval. +### Circuit Breaker {#circuit-breaker} + +The circuit breaker kicks in when requests fail with a [retryable error](https://github.com/temporalio/temporal/blob/13d6cd8cf7a4ba0c4660cf98f672bbd645dca3e7/components/nexusoperations/executors.go#L659) +consecutively as it might indicate that the destination (eg: Nexus service to start operation, or +the caller for callback request) is down or unable to process the request. The default behavior of +the circuit breaker is to open after 5 consecutive failed requests. Once in open state, Nexus taskk +will fail early and requests won't be sent to destination. After a minute in open state, it will +change to half-open state, which will allow only 1 request to be made. If the request is successful, +then the circuit breaker changes its state to closed, and allows all requests to pass through. + ### Execution Semantics {#execution-semantics} #### At-least-once Execution Semantics and idempotency diff --git a/docs/evaluate/development-production-features/index.mdx b/docs/evaluate/development-production-features/index.mdx index da67de70fd..4fe83b65b0 100644 --- a/docs/evaluate/development-production-features/index.mdx +++ b/docs/evaluate/development-production-features/index.mdx @@ -44,4 +44,4 @@ Through a Temporal SDK, Temporal provides a wide range of features that enable d - **[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). \ No newline at end of file +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/temporal-nexus.mdx b/docs/evaluate/development-production-features/temporal-nexus.mdx index 3ea2c831ab..d59e23fab7 100644 --- a/docs/evaluate/development-production-features/temporal-nexus.mdx +++ b/docs/evaluate/development-production-features/temporal-nexus.mdx @@ -50,31 +50,31 @@ Unlike other forms of inter-service communication, Nexus combines a familiar pro ### Use cases - **Cross-team, cross-domain, and cross-namespace** \- -Nexus is purpose-built to connect Temporal Applications within and across Namespaces. -It addresses the limitations of Child Workflows, Activity Wrappers, and bespoke APIs that target a remote Namespace; such as leaking implementation details, second-class observability, overly-permissive security, and error-prone boilerplate code. -Nexus has a streamlined Temporal developer experience, reliable execution, and integrated observability. + Nexus is purpose-built to connect Temporal Applications within and across Namespaces. + It addresses the limitations of Child Workflows, Activity Wrappers, and bespoke APIs that target a remote Namespace; such as leaking implementation details, second-class observability, overly-permissive security, and error-prone boilerplate code. + Nexus has a streamlined Temporal developer experience, reliable execution, and integrated observability. - **Share a subset of a Temporal Application** \- -Abstract and share a subset of an Application as a Nexus Service. -Nexus Operations can span any length of execution, be synchronous or asynchronous, and be implemented with Temporal primitives, like Workflows, Signals, or Updates. -Expose Services on a Nexus Endpoint for others to use and secure them with access control policies. -Nexus Endpoints decouple callers from handlers, so teams can operate more autonomously. + Abstract and share a subset of an Application as a Nexus Service. + Nexus Operations can span any length of execution, be synchronous or asynchronous, and be implemented with Temporal primitives, like Workflows, Signals, or Updates. + Expose Services on a Nexus Endpoint for others to use and secure them with access control policies. + Nexus Endpoints decouple callers from handlers, so teams can operate more autonomously. - **Modular design for growth** \- -Temporal Nexus enables a modular application design that can evolve as you grow. -Start with Nexus Services in a monolithic Namespace and move Services to separate Namespaces with small configuration changes. + Temporal Nexus enables a modular application design that can evolve as you grow. + Start with Nexus Services in a monolithic Namespace and move Services to separate Namespaces with small configuration changes. - **Smaller failure domains** \- When teams operate in the same monolithic Namespace, everything is available to everyone, and mis-behaving Workers can trigger rate limits that affect all teams operating in that monolithic Namespace. Nexus enables each team to have their own Namespace for improved security, troubleshooting, and fault isolation. - **Multi-region** \- -Nexus requests in Temporal Cloud are routed across a global mTLS-secured Envoy mesh. -Built-in Nexus Machinery provides reliable at-least-once execution and Workflow policy can deduplicate requests for exactly-once execution, even across multi-region boundaries. + Nexus requests in Temporal Cloud are routed across a global mTLS-secured Envoy mesh. + Built-in Nexus Machinery provides reliable at-least-once execution and Workflow policy can deduplicate requests for exactly-once execution, even across multi-region boundaries. ### Key features - **Familiar developer experience** \- -Temporal SDKs provide an integrated way to build and use Nexus Services. + Temporal SDKs provide an integrated way to build and use Nexus Services. - Use Nexus Services from a caller Workflow. - Run Nexus Service handlers in a Worker, often the same Worker as underlying Temporal primitives. - Implement long-running asynchronous Nexus Operations as Workflows. @@ -89,32 +89,32 @@ Temporal SDKs provide an integrated way to build and use Nexus Services. - Streamline operations by running Nexus Services in existing queue-based Workers. - **Built-in Nexus Machinery** \- -Execution guarantees are provided with built-in Nexus Machinery. + Execution guarantees are provided with built-in Nexus Machinery. - Execute Nexus Operations with reliable state-machine-based invocation and completion callbacks. - Guarantee atomic handoff from Workflow Event History to Nexus Operation state machines. - Ensure reliable execution with automatic retries, rate limiting, concurrency limiting, and circuit breaking. - **Integrated observability** \- -Execution debugging and observability is integrated into the Temporal Platform. + Execution debugging and observability is integrated into the Temporal Platform. - View Nexus Operation lifecycle and error info in Workflow Event History. - Debug across Namespaces with bi-directional linking. - Generate metrics, traces, and logs. - **Improved blast radius isolation** \- -Separate Namespaces isolate underlying Workers and sensitive Workflow state. + Separate Namespaces isolate underlying Workers and sensitive Workflow state. - Limit direct access to a Namespace, while exposing Nexus Endpoints for others to use. - Isolate misbehaving Workers that affect rate limits for all Workers in a Namespace. - Avoid leaking Workflow implementation details to external callers. - **Enhanced security and connectivity** \- -Temporal Cloud provides integrated Nexus access controls and multi-region routing. + Temporal Cloud provides integrated Nexus access controls and multi-region routing. - Connect Applications across Namespaces in an Account with Temporal's private mTLS-secured Envoy mesh. - Restrict which callers can use a Nexus Endpoint, with built-in Endpoint access controls. - Stream audit logs including Nexus Registry actions to create, update, or delete Endpoints. ## Learn more - To connect with the Nexus community, join the [#nexus](https://temporalio.slack.com/archives/C07LQN0JK9B) channel in [Temporal Slack](https://t.mp/slack). +To connect with the Nexus community, join the [#nexus](https://temporalio.slack.com/archives/C07LQN0JK9B) channel in [Temporal Slack](https://t.mp/slack). @@ -124,4 +124,4 @@ Temporal Cloud provides integrated Nexus access controls and multi-region routin - \ No newline at end of file + diff --git a/docs/evaluate/temporal-cloud/legacy-pricing.mdx b/docs/evaluate/temporal-cloud/legacy-pricing.mdx index 617943caf6..0e911a67b2 100644 --- a/docs/evaluate/temporal-cloud/legacy-pricing.mdx +++ b/docs/evaluate/temporal-cloud/legacy-pricing.mdx @@ -160,9 +160,9 @@ We offer two Support tiers: Basic and Premium. Support costs are outlined in the table below. A complete description of Support plans and response times can be found in our [Support](/cloud/support#support) documentation. -| | Basic | Premium | -| ------------------- | ------------------------------------------- | --------------------------------------------- | -| Pricing (per month) | Greater of $200 or 10% of monthly usage | Contact [Sales](mailto:sales@temporal.io) | +| | Basic | Premium | +| ------------------- | ------------------------------------------- | ----------------------------------------- | +| Pricing (per month) | Greater of $200 or 10% of monthly usage | Contact [Sales](mailto:sales@temporal.io) | ### Pricing options {#pricing-options} @@ -456,4 +456,3 @@ You will be assigned a new Temporal account and be treated as a new customer. **What happens to my credits if I cancel my account?** Prepaid but unused credits purchased after June 17, 2024 will be refunded if the account is canceled. - diff --git a/docs/evaluate/temporal-cloud/service-availability.mdx b/docs/evaluate/temporal-cloud/service-availability.mdx index 58861f5e91..86eb808c42 100644 --- a/docs/evaluate/temporal-cloud/service-availability.mdx +++ b/docs/evaluate/temporal-cloud/service-availability.mdx @@ -52,10 +52,10 @@ Temporal Cloud operates in several regions on Amazon Web Services (AWS): Temporal Cloud operates in two regions on Google Cloud (GCP): -| Area | Code | Region | -| ------------- | -------------------- | ------ | -| North America | us-west1 | Oregon | -| Asia Pacific | asia-south1 | Mumbai | +| Area | Code | Region | +| ------------- | ----------- | ------ | +| North America | us-west1 | Oregon | +| Asia Pacific | asia-south1 | Mumbai | ## Throughput expectations {#throughput} diff --git a/docs/production-deployment/cloud/terraform-provider.mdx b/docs/production-deployment/cloud/terraform-provider.mdx index 8e9d080b45..96e7452aa0 100644 --- a/docs/production-deployment/cloud/terraform-provider.mdx +++ b/docs/production-deployment/cloud/terraform-provider.mdx @@ -405,14 +405,15 @@ If you have an existing User in Temporal Cloud, you can import it into Terraform ```yml resource "temporalcloud_user" "user" { } - ``` + ``` +```` 1. Run the `terraform import` command and pass in the User ID - Your User ID is available using the Temporal Cloud CLI `tcld u l` command. + Your User ID is available using the Temporal Cloud CLI `tcld u l` command. - ```bash - terraform import temporalcloud_user.user 72360058153949edb2f1d47019c1e85f - ``` + ```bash + terraform import temporalcloud_user.user 72360058153949edb2f1d47019c1e85f +```` The User is now a part of the Terraform state and all changes to the User should be managed by Terraform.