Job Queue — Background Job Queue & Worker System
A resilient, fault-tolerant background execution engine and worker management platform.
A resilient, fault-tolerant background execution engine and worker management platform. Enables web applications to submit long-running tasks asynchronously, receive deterministic job IDs immediately, and process jobs safely with atomic row locking (FOR UPDATE SKIP LOCKED), multi-level priority scheduling (High, Normal, Low), exponential backoff retries, Dead Letter Queue (DLQ) quarantine, heartbeat-based worker crash detection, and automatic job recovery without duplicate execution.
- 1:1 pixel-accurate layout matching reference design with 6 top metric cards, donut status distribution, queue depth bar chart, and processing rate line chart
- Decoupled asynchronous submission returning HTTP 202 Accepted and unique job ID immediately while background workers process tasks separately
- Store-first state persistence committing every job to Supabase in pending status before any worker claims execution
- Atomic mutex locking via FOR UPDATE SKIP LOCKED preventing dual-worker race conditions and duplicate concurrent runs
- Strict multi-level priority queue ensuring High priority jobs preempt Normal and Low priority tasks
- Exponential backoff retries with jitter and automated Dead Letter Queue (DLQ) quarantine after 5 failed attempts
- Heartbeat monitoring watchdog detecting mid-flight worker crashes and automatically reclaiming abandoned jobs safely
- Complete Supabase PostgreSQL schema with PL/pgSQL claim, complete, fail, and watchdog reaper functions plus RLS policies
Built with: Distributed Job Queue, Worker Pool Architecture, FOR UPDATE SKIP LOCKED, Exponential Backoff & Jitter, Dead Letter Queue (DLQ), Heartbeat Watchdog Recovery, Mutual Exclusion Locks, Per-Type Concurrency Rate Limits, Supabase / PostgreSQL Schema, Vanilla JavaScript, HTML5 / CSS3, Google Fonts (Sora, Outfit, Chivo Mono)