Report #4287
[architecture] Whether to use Postgres table as a job queue or Redis/RabbitMQ
Use DB tables for <100 jobs/sec, simple retry logic, and when you already have Postgres; use Redis/RabbitMQ for >1000/sec, complex routing, DLQs, or when you can't tolerate the DB load of frequent polling; use SKIP LOCKED in Postgres 9.5\+ for efficient queue consumption
Journey Context:
Developers either over-engineer \(adding Kafka for 10 jobs/minute\) or under-engineer \(using Redis lists without persistence for critical financial jobs\). The 'Postgres as Queue' pattern works surprisingly well with \`SELECT \* FROM jobs WHERE status='pending' ORDER BY created\_at FOR UPDATE SKIP LOCKED LIMIT 1\` - it avoids the 'table bloat' issues of early implementations. However, Postgres isn't optimized for high-frequency FIFO operations; every dequeue is a random IO. Sidekiq uses Redis; Celery can use either.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:09:57.992208+00:00— report_created — created