[Feature Request] Implement Native Parallel Branch Execution and Synchronization (Join) for Workflow Engine #22232

Open
opened 2026-02-21 20:16:15 -05:00 by yindo · 0 comments
Owner

Originally created by @smartass-4ever on GitHub (Feb 15, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Yes. Currently, dify workflows execute nodes in a strictly sequential manner. In complex enterprise pipelines (e.g., Deep Research or Multi-Model Comparison), users are forced to run orthogonal tasks—like searching Google, querying a database, and analyzing a PDF—one after the other. This creates a "long-tail" latency bottleneck where the total execution time is the sum of all nodes rather than the time of the single slowest path.

2. Additional context or comments

I propose an update to the GraphEngine and WorkflowEngine to support Fork-Join Parallelism:

Implicit Parallelism: When a node has multiple downstream "sibling" nodes with no inter-dependencies, the engine should dispatch them to a thread pool (using asyncio.gather or the existing WorkerPool) simultaneously.

Explicit Join Node: Introduce a new system node type called "Join". This node acts as a synchronization barrier that waits for all incoming parallel edges to be marked as TAKEN or SKIPPED before allowing the workflow to proceed.

Variable Scope Isolation: Ensure that parallel branches maintain their own local execution context to prevent race conditions when writing to shared workflow variables.

This will improve resource efficiency and massively reduce latency issues.

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @smartass-4ever on GitHub (Feb 15, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. Yes. Currently, dify workflows execute nodes in a strictly sequential manner. In complex enterprise pipelines (e.g., Deep Research or Multi-Model Comparison), users are forced to run orthogonal tasks—like searching Google, querying a database, and analyzing a PDF—one after the other. This creates a "long-tail" latency bottleneck where the total execution time is the sum of all nodes rather than the time of the single slowest path. ### 2. Additional context or comments **I propose an update to the GraphEngine and WorkflowEngine to support Fork-Join Parallelism:** Implicit Parallelism: When a node has multiple downstream "sibling" nodes with no inter-dependencies, the engine should dispatch them to a thread pool (using asyncio.gather or the existing WorkerPool) simultaneously. Explicit Join Node: Introduce a new system node type called "Join". This node acts as a synchronization barrier that waits for all incoming parallel edges to be marked as TAKEN or SKIPPED before allowing the workflow to proceed. Variable Scope Isolation: Ensure that parallel branches maintain their own local execution context to prevent race conditions when writing to shared workflow variables. **This will improve resource efficiency and massively reduce latency issues.** ### 3. Can you help us with this feature? - [x] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 20:16:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22232