Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hypha-docs.plinqx.app/llms.txt

Use this file to discover all available pages before exploring further.

The PARALLEL node executes multiple branches simultaneously, allowing you to perform independent operations in parallel.

Overview

PARALLEL nodes enable:
  • Concurrent Execution: Run multiple branches at the same time
  • Independent Operations: Each branch executes independently
  • Concurrency Control: Limit maximum parallel branches
  • Fail Fast: Option to stop on first error

How It Works

1

Initialize Branches

PARALLEL node initializes all branch executions.
2

Execute Concurrently

All branches execute simultaneously (up to concurrency limit).
3

Wait for Completion

Flow waits for all branches to complete.
4

Continue Flow

Flow continues after all branches complete.

Configuration

Branches

Define 2-4 branches:
  • Branch Names: Label each branch clearly
  • Independent Nodes: Each branch contains its own node sequence
  • Shared Context: All branches share the same flow context

Concurrency

Control parallel execution:
  • Max Concurrency: Maximum branches executing simultaneously
  • Default: All branches execute concurrently
  • Limiting: Lower values for resource-constrained scenarios

Fail Fast

Option to stop on first error:
  • Enabled: Stops all branches when one fails
  • Disabled: Continues other branches even if one fails
  • Use Case: When branches are dependent

Branch Output

Each branch produces output accessible via:
{{parallel_node.branch1.output}}
{{parallel_node.branch2.result}}

Use Cases

  • Independent API Calls: Fetch data from multiple sources
  • Parallel Processing: Process different data sets simultaneously
  • Resource Optimization: Utilize available resources efficiently
  • Time Savings: Reduce total execution time

Best Practices

Independent Branches

Ensure branches don’t depend on each other

Set Concurrency

Configure appropriate concurrency limits

Handle Errors

Use TRY nodes in branches for error handling

Monitor Performance

Monitor branch execution times

Example: Parallel API Calls

PARALLEL Node
├── Branch 1: Fetch user data
├── Branch 2: Fetch order data
└── Branch 3: Fetch product data

→ All three API calls execute simultaneously
→ Flow continues after all complete

Next Steps

JOIN Node

Combine parallel branch results

CHOICE Node

Conditional branching