TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Simple Task Queue – OSS Task Queue Using PostgreSQL's for Update Skip Locked

1 pointsby virtuallyvivek4 months ago

1 comment

virtuallyvivek4 months ago
When building evaluation infrastructure for generative AI systems at Gentrace [1], we needed a task queue that could handle thousands of tasks per day while remaining simple to self-host.<p>We considered traditional options like RabbitMQ and Kafka but wanted to avoid the operational overhead for our self-hosted customers. That&#x27;s when we turned to PostgreSQL.<p>Using PostgreSQL&#x27;s FOR UPDATE SKIP LOCKED, we built a task queue that supports retries, parallelism, and large payloads, all without adding new infrastructure. Sometimes, PostgreSQL really is all you need!<p>It&#x27;s been running in production at Gentrace, handling 8-10k tasks daily with peaks of 45k during large-scale evaluations. The architecture is simple, reliable, and easy to maintain.<p>We decided to open-source a version of this implementation as Simple Task Queue. It includes:<p>- A task queue built on PostgreSQL - Type-safe task definitions and scheduling in TypeScript - Support for retries, parallel processing, and scheduled tasks<p>We also wrote a deep dive about how we built it on our blog: <a href="https:&#x2F;&#x2F;gentrace.ai&#x2F;blog&#x2F;task-queue-simplification" rel="nofollow">https:&#x2F;&#x2F;gentrace.ai&#x2F;blog&#x2F;task-queue-simplification</a><p>We&#x27;d love feedback! Try it out, and let us know how it works for you.<p>- Vivek<p>[1]: <a href="https:&#x2F;&#x2F;gentrace.ai&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gentrace.ai&#x2F;</a>