Skip to content

Failure Modes

FailureDetectionRecovery
Worker dies mid-jobJob unacked, Redis re-delivers after visibility timeoutOrchestrator's job tracker times out; re-enqueues or surfaces partial result
Orchestrator dies mid-sessionNext request hits a new instanceNew instance reconstructs state from DB/Redis, resumes
Result never arrivesPer-job timeout in OrchestratorRe-dispatch to another worker, or proceed with partial results
Redis unavailableHealth checkTotal system stop. Run as managed service with replicas.
Slow workerPer-job latency SLOTimeout, re-dispatch, or proceed with partial results
Bad worker outputSchema validation on resultOrchestrator rejects, re-dispatches with refined brief

Orchestrator Recovery in Detail

When an Orchestrator instance dies:

  1. The session's sticky routing key resolves to a different instance
  2. The new instance loads session state from the database
  3. It checks Redis for any in-flight or completed-but-unread worker results
  4. It resumes the conversation with the user's next message

This works because the Orchestrator is designed to reconstruct itself from external state on every turn. In-memory state is a cache, not the source of truth.

Partial Results

The Orchestrator should be willing to return a partial answer with explicit gaps ("I found two great dinner options but couldn't confirm a third within your budget — want me to relax the price or expand the neighborhood?") rather than blocking on a failed worker. This requires a result schema that supports partial success.

Marchay Platform Documentation