Home / Companies / DBOS / Blog / Post Details
Content Deep Dive

Making Postgres Queues Scale

Blog post from DBOS

Post Details
Company
Date Published
Author
Qian Li Peter Kraft
Word Count
1,067
Company Posts That Month
4
Language
English
Hacker News Points
-
Post removed?
No
Summary

Scaling Postgres-backed task queues for durable workflows presents challenges, particularly as workloads grow to tens of billions of workflows per month. A major issue is contention between multiple workers attempting to dequeue the same tasks simultaneously, which can be mitigated using Postgres's SKIP LOCKED feature, allowing workers to select and lock only those tasks not already being processed. However, transaction isolation levels, specifically REPEATABLE READ, can cause serialization failures at high concurrency, which can be alleviated by using READ COMMITTED for queues without global flow control. Additionally, inefficient indexes can lead to high CPU usage, necessitating more selective indexing that optimizes query performance and reduces maintenance costs, ultimately allowing the system to scale to over 30,000 workflows per second. These optimizations significantly enhance throughput and efficiency, demonstrating the potential for Postgres-backed systems to handle massive scales with proper tuning and adjustments.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Observability 2 4,166 768 194 +22%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.