Skip to content

Failure Modes

Failure modes map

Эта страница группирует failures, которые ChokaQ рассчитан пережить или явно показать.

Failure table

FailureChokaQ behaviorRemaining responsibility
Host crashes before fetchJob остается pending в JobsHot.Monitor queue lag.
Host crashes after fetch before processingFetched recovery возвращает row в pending.Tune fetched timeout.
Host crashes during processingHeartbeat expires; zombie rescue moves row to DLQ.Inspect side effects before resurrection.
Handler throws transient errorJob retries with delay, если budget remains.Classify exceptions accurately.
Handler throws fatal errorJob fast-fails в DLQ.Fix code/payload.
SQL deadlock or transient outageSQL retry policy retries storage operation.Monitor SQL health.
SQL schema missingHealth check fails; workers cannot run correctly.Run migrations/bootstrap.
SignalR disconnectsDashboard can refresh from storage.Do not treat SignalR as source of truth.
Operator bulk purges wrong rowsData is gone.Require authorization, preview, typed confirmation.

Worst case to understand

Самый сложный случай:

  1. handler выполняет external side effect;
  2. process crashes before Archive;
  3. recovery позже снова делает job executable.

ChokaQ не может знать, произошел ли external side effect. Handler должен использовать business idempotency key или downstream provider idempotency.

Архитектурное решение

ChokaQ разделяет failures на две категории: failures, которые runtime может safely repair automatically, и failures, которые должны быть surfaced для human или application-level judgment. Это различие объясняет, почему Fetched rows можно возвращать в Pending, а Processing zombies перемещаются в DLQ.

Альтернатива - максимизировать automatic retry. В load tests это может выглядеть привлекательно, но скрывает трудную distributed-systems проблему: crashed handler мог уже вызвать external system. ChokaQ выбирает explicit visibility вместо притворства, что queue может гарантировать exactly-once side effects across arbitrary dependencies.

Trade-off - operational work. Teams должны monitor DLQ, писать idempotent handlers и определять resurrection policy для business-critical jobs.

Дополнительные вопросы

Какие failures автоматически safe to retry?
Fetched-but-not-started jobs и явно transient handler failures внутри retry budget.

Какие failures требуют operator judgment?
Processing zombies, malformed payloads, exhausted retries и destructive operator actions.

Какая главная нерешенная distributed systems problem?
Exactly-once external side effects across arbitrary systems.

Лицензия Apache 2.0