LESSON 75 / 215·3 min readIntermediate

Choosing orchestration tools

Should knowConcept lesson
01 Understand02 Recall03 Prepare

Words made simple

A few useful meanings before you read the explanation.

Orchestration
Coordinating tasks: deciding their order, passing data between them, and handling waiting or failures.
API
A way for one piece of software to ask another for data or an action. A claims API might return the current status of a claim.
LLM
A model trained to work with language. It can write or summarize text, but its answer still needs checking against reliable information.
More words from this lesson
Embedding
A list of numbers that represents the meaning of some content. Similar meanings can produce nearby lists of numbers.
Deterministic
Following steps or rules defined by code. The model does not decide which step should run next in a deterministic workflow.
State
The data describing where a workflow is now, what it already knows, and what still needs to happen.
Persistence
Saving information so it remains available after a request ends or a process restarts.
Durable
Able to retain progress and recover across interruptions. Durable workflows require appropriate storage and retry behavior.

Overview

  • Workflow engines and job systems provide different guarantees for dispatch, persistence, recovery, waiting, and coordination.
  • Temporal is a durable workflow platform; BullMQ is a Redis-backed job library; Inngest and Trigger.dev offer developer-oriented durable/background execution; n8n provides visual automation; Azure Durable Functions provides stateful orchestration in Azure.

Why this matters

Ordinary request handlers are insufficient for durable, retried, multi-step jobs.

An everyday example

Choose a task queue, a full case-management system, or an automation board according to the work.

A technical example

BullMQ runs PDF embedding jobs; Temporal coordinates a multi-day claim review with timers and signals.

How it works

  1. Persist task
  2. Dispatch worker
  3. Run steps
  4. Track state/retry
  5. Resume or redrive
  6. Report durable outcome.

Architecture and flow

API → orchestration/job system → workers → business services → persisted status.

The insurance assistant example

A claim process continues across staff review and backend failures instead of living in the chatbot request.

When to use it

Match required durability, approvals, operations, and language ecosystem.

When to avoid it

Redis alone is not a full business workflow engine, and visual automation should not bypass core claim-service rules.

Interview answer

“I choose queues for isolated jobs and durable workflow engines for long-lived coordination. The exact recovery, retry, and persistence contract drives the decision.”

Benefits, trade-offs, and production considerations

  • Product capabilities, hosting, and pricing change.
  • Validate each platform's failure behavior experimentally and calculate operating burden, including self-hosting.
ToolWhere it fitsStrengthTrade-off / avoid when
TemporalLong-lived code workflows with durable coordinationEvent-history-based recovery and timersRequires learning deterministic workflow constraints and operating/using the platform; excessive for simple jobs
BullMQNode jobs, queues, retries, scheduled workNatural MERN fit and Redis-based worker scalingConfigure Redis persistence and stalled-job behavior; complex review lifecycle still needs application state
RedisCache, coordination, queue backingFast data structures and countersDurability depends on deployment/configuration; not a substitute for authoritative business records
InngestEvent-driven functions and durable stepsDeveloper-facing event orchestrationAssess hosting, limits, state/event handling, and dependency on platform
Trigger.devBackground tasks and durable task executionTypeScript-oriented long work and task operationsAssess deployment model and limits; not every business process needs task-platform migration
n8nVisual integrations and operational automationAccessible workflow composition and connectorsReview credentials, branching complexity, testing, and execution persistence; keep financial rules in services
Azure Durable FunctionsStateful workflows in Azure FunctionsAzure integration and durable orchestrationReplay constraints and hosting configuration; model/network calls belong in activities

Temporal mental model: workflow code decides the process; activities perform network calls and other side effects. Recorded activity outcomes support replay. Do not call the LLM directly inside deterministic workflow logic. Idempotency is still needed for activities that may retry.

BullMQ mental model: producer submits a job; Redis stores queue state; workers process it. Store durable business task status outside worker memory, configure retries and dead-letter/review handling, and use transactionally deduplicated writes. A queue's job ID is helpful but is not your entire business idempotency strategy.


PAUSE & RECALL

Can you explain it without the notes?

Choosing orchestration tools

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

Workflow engines and job systems provide different guarantees for dispatch, persistence, recovery, waiting, and coordination. Temporal is a durable workflow platform; BullMQ is a Redis-backed job library; Inngest and Trigger.dev offer developer-oriented…

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: MCP architecture: host, client, and server

Adapted from 13_AI.MD · “Choosing orchestration tools”. Examples are study fragments; framework behavior can depend on your version.