Night Mode LabsBlue Book
Service Archetypes

Worker and Batch Job

Workers and batch jobs often run critical business processes without a user watching. They need clear scheduling, retry, idempotency, and completion signals.

Common patterns

  • Queue consumer.
  • Scheduled job.
  • Batch import or export.
  • Report generation.
  • Data sync.
  • Cleanup or lifecycle job.

Architecture shape

Required controls

  • Idempotency for retries.
  • Timeout and retry policy.
  • Dead-letter handling.
  • Completion and freshness metrics.
  • Backpressure and concurrency limits.
  • Runbook for replay or restart.
  • Data reconciliation where records matter.

Readiness checks

Before production, confirm:

  • Failed messages have an owner and replay process.
  • Job completion is visible in dashboards.
  • Alerting distinguishes delayed, failed, and stuck work.
  • Restart behavior is safe.
  • Downstream systems can handle replay or backfill volume.

Watchouts

  • Silent job failure can become business process failure.
  • Retrying writes without idempotency creates duplicates.
  • Batch jobs can overwhelm downstream systems.
  • Success should mean business completion, not only process exit code.

On this page