Common Use Cases for Temporal Nexus
Temporal Nexus is available in Public Preview for Temporal Cloud and self-hosted deployments.
Temporal Nexus enables the following use cases:
- Cross-team, cross-domain, and cross-namespace - connect Temporal Applications within and across Namespaces.
- Share a subset of a Temporal Application - abstract and share a subset of an Application as a Nexus Service.
- Modular design for growth - modular application design that can evolve as you grow.
- Smaller failure domains - 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.
- Evaluate why you should use Nexus and learn more about Nexus use cases.
Share Workflows Across Namespaces
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. Nexus has a streamlined Temporal developer experience, reliable execution, and integrated observability.
Without Nexus, when a caller Workflow invokes another Workflow directly the caller must know:
- target Workflow's Namesapce and Task Queue.
- target Workflow retry policy and timeouts.
- target Workflow options including Workflow-Id-Reuse-Policy and Workflow-Id-Conflict-Policy.
- target Workflow ID uniqueness constraints, so it doesn't conflict with other Workflow types in the handler namespace.
This creates a high degree of coupling between the caller and handler, by exposing internal implementation details to the caller. This adds friction for the caller, who shouldn't need to know this level of detail. It's more difficult to refactor or migrate handler Workflows to different Namespace or Task Queue. In short, Workflow to Workflow is a leaky abstraction.
Nexus addresses this by providing a cleaner service contract between the caller and handler. Nexus is suitable for abstracting and sharing Workflows across team, domain, and namespace boundaries. Nexus requests in Temporal Cloud are routed across a global mTLS-secured Envoy mesh, so they're also suitable for multi-region use cases.
Enable calls across Namespaces by:
- Creating a Nexus Endpoint in the Nexus Registry that:
- Targets the handler Namespace.
- Allows the caller Namespace.
- Creating a Nexus Service in a Worker within a handler Namespace.
- Abstract Workflows with Nexus Operations using Temporal SDK builder functions for Nexus Operations.
- Register the Nexus Service with the Worker.
- Ensure the Worker is polling the Endpoint's Task Queue.
- Calling the Nexus Service from a Workflow in a different Namespace.
- Execute a Nexus Operation from a caller Workflow using the Temporal SDK.