Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add docs for Nexus circuit breaker #3220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/develop/dotnet/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down
9 changes: 5 additions & 4 deletions docs/develop/go/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions docs/develop/java/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion docs/develop/php/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions docs/develop/python/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ 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)

**Get Connected with the Temporal Python Community:**

- [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)

Expand Down
3 changes: 2 additions & 1 deletion docs/develop/typescript/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions docs/develop/worker-performance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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**:
Expand Down Expand Up @@ -336,7 +335,7 @@ const workerOptions = {
tuner: {
tunerOptions: resourceBasedTunerOptions,
},
}
};
// Combining different types
const resourceBasedTunerOptions: ResourceBasedTunerOptions = {
targetMemoryUsage: 0.8,
Expand Down
10 changes: 10 additions & 0 deletions docs/encyclopedia/temporal-nexus-service-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would explicitly call out request timeouts and how that may relate to when a worker is down.

consecutively as it might indicate that the destination (eg: Nexus service to start operation, or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The endpoint would be down, not the service.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure users will understand what nexus tasks are in this context and this applies to callback "tasks" as well. This is all internal details, you should use "the Nexus machinery" instead.

will fail early and requests won't be sent to destination. After a minute in open state, it will
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
will fail early and requests won't be sent to destination. After a minute in open state, it will
will fail early and requests won't be sent to that 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.

Comment on lines +149 to +158
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only change I made, all other changes was yarn build.

### Execution Semantics {#execution-semantics}

#### At-least-once Execution Semantics and idempotency
Expand Down
2 changes: 1 addition & 1 deletion docs/evaluate/development-production-features/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).
For detailed information on Temporal feature release stages and criteria, see this [Product Release Stages Guide](/evaluate/development-production-features/release-stages).
36 changes: 18 additions & 18 deletions docs/evaluate/development-production-features/temporal-nexus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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).

<RelatedReadContainer>
<RelatedReadItem path="https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082" text="Nexus keynote & demo - Replay video" archetype="replay-talk" />
Expand All @@ -124,4 +124,4 @@ Temporal Cloud provides integrated Nexus access controls and multi-region routin
<RelatedReadItem path="/develop/go/nexus" text="Go SDK - Nexus quick start and code sample" archetype="feature-guide" />
<RelatedReadItem path="/develop/java/nexus" text="Java SDK - Nexus quick start and code sample" archetype="feature-guide" />
<RelatedReadItem path="/nexus" text="Nexus" archetype="encyclopedia" />
</RelatedReadContainer>
</RelatedReadContainer>
7 changes: 3 additions & 4 deletions docs/evaluate/temporal-cloud/legacy-pricing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 &#36;200 or 10% of monthly usage | Contact [Sales](mailto:[email protected]) |
| | Basic | Premium |
| ------------------- | ------------------------------------------- | ----------------------------------------- |
| Pricing (per month) | Greater of &#36;200 or 10% of monthly usage | Contact [Sales](mailto:[email protected]) |

### Pricing options {#pricing-options}

Expand Down Expand Up @@ -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.

8 changes: 4 additions & 4 deletions docs/evaluate/temporal-cloud/service-availability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
11 changes: 6 additions & 5 deletions docs/production-deployment/cloud/terraform-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down