AI EngineeringInterview preparation
Intermediate·Concept·3 min read

Choosing orchestration tools

Practice this question

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.


Adapted from 13_AI.MD · “Choosing orchestration tools”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.