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

Temporal Nexus: Deploy to Production - Temporal Cloud & Nexus #3078

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

jsundai
Copy link
Contributor

@jsundai jsundai commented Sep 11, 2024

What does this PR do?

Preview

Notes to reviewers

Anchors and links to be added later.

@jsundai jsundai marked this pull request as ready for review September 12, 2024 19:26
@jsundai jsundai requested a review from a team as a code owner September 12, 2024 19:26
Copy link
Contributor

@prasek prasek left a comment

Choose a reason for hiding this comment

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

dropped some suggestions, thanks!

docs/production-deployment/cloud/nexus/getting-started.mdx Outdated Show resolved Hide resolved
docs/production-deployment/cloud/nexus/getting-started.mdx Outdated Show resolved Hide resolved
docs/production-deployment/cloud/nexus/index.mdx Outdated Show resolved Hide resolved
docs/production-deployment/cloud/nexus/operations.mdx Outdated Show resolved Hide resolved
docs/production-deployment/cloud/nexus/using-nexus.mdx Outdated Show resolved Hide resolved
docs/production-deployment/cloud/nexus/using-nexus.mdx Outdated Show resolved Hide resolved
### At-least-once Execution Semantics and Idempotency

Nexus Operations, like Activities, have at-least-once execution semantics.
The caller's Nexus Machinery will keep trying to start the Operation over and over, so the Nexus `Operation` handler should be idempotent just like Activities should be idempotent as a general rule. It's not required in all cases, but highly recommended in general.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The caller's Nexus Machinery will keep trying to start the Operation over and over, so the Nexus `Operation` handler should be idempotent just like Activities should be idempotent as a general rule. It's not required in all cases, but highly recommended in general.
The caller's Nexus Machinery will keep trying to start the Operation over and over until the ScheduleToClose timeout is exceeded which has a [maximum duration](/operations#limits??). This means the Nexus `Operation` handler should be idempotent just like Activities should be idempotent as a general rule. It's not required in all cases, but highly recommended in general.

docs/production-deployment/cloud/nexus/using-nexus.mdx Outdated Show resolved Hide resolved
docs/production-deployment/cloud/nexus/using-nexus.mdx Outdated Show resolved Hide resolved
3. Update the Nexus Endpoint target to the new Namespace.
4. Configure the Endpoint allowlist to allow calls from the original monolithic Namespace.
5. New Nexus Operations will be routed from callers in the monolithic Namespace to the new Namespace.
4. Quiesce Nexus Operations on the previous target Namespace.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
4. Quiesce Nexus Operations on the previous target Namespace.
4. Prepare Nexus Operations on the previous target Namespace during the migration.

4. Configure the Endpoint allowlist to allow calls from the original monolithic Namespace.
5. New Nexus Operations will be routed from callers in the monolithic Namespace to the new Namespace.
4. Quiesce Nexus Operations on the previous target Namespace.
1. Leave the previous Worker deployment running until all existing Nexus Operations in the previous Namespace have completed (and their underlying Workflows, if any).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. Leave the previous Worker deployment running until all existing Nexus Operations in the previous Namespace have completed (and their underlying Workflows, if any).
1. Leave the previous Worker deployment running until all existing Nexus Operations in the previous Namespace have completed.
This includes their underlying Workflows, if they exist.

5. New Nexus Operations will be routed from callers in the monolithic Namespace to the new Namespace.
4. Quiesce Nexus Operations on the previous target Namespace.
1. Leave the previous Worker deployment running until all existing Nexus Operations in the previous Namespace have completed (and their underlying Workflows, if any).
2. Previous Workers in the monolithic Namespace can have the service implementation removed, since it is now being served from the new Endpoint target Namespace.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
2. Previous Workers in the monolithic Namespace can have the service implementation removed, since it is now being served from the new Endpoint target Namespace.
2. Remove Workers from the monolithic Namespace, since those Workflows and Activities are now served from the new Endpoint targeted Namespace.

2. If using Signal-with-Start behind a Nexus Operation, then a new entity-Workflow will be started in the new target Namespace.
3. A cancel Nexus Operation request from a caller Workflow will be routed through the Nexus Endpoint to the new target Namespace, which may not have the underlying Workflow.

In these scenarios, Temporal can provide guidance on different migration strategies.
Copy link
Contributor

Choose a reason for hiding this comment

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

How should someone seek this guidance? Support? Community?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants