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

1M Durable Workflows per Second on Postgres

Blog post from DBOS

Post Details
Company
Date Published
Author
Peter Kraft
Word Count
1,123
Company Posts That Month
3
Language
English
Hacker News Points
3
Post removed?
No
Summary

A Postgres-backed durable workflow system was scaled from roughly 20,000 to more than 1 million workflows per second by sharding workload data across 50 RDS Postgres servers, with PgDog routing requests according to uniformly distributed shard keys. The benchmark used simple no-op workflows, 48 worker processes per shard, and a design in which all data and operations for an individual workflow remained on one shard, avoiding costly cross-shard coordination. Initial testing revealed that throughput became unstable beyond approximately 8–16 shards because temporary slowdowns on one shard triggered a feedback loop: longer dequeue queries led more workers to target that shard, increasing lock contention and further delaying queries. The system addressed this metastability by using PostgreSQL advisory locks to limit concurrent dequeue activity on each shard, causing workers unable to obtain a dequeue lock to move to another shard rather than wait. This approach prevented individual shards from becoming overloaded and enabled stable near-linear scaling for high-volume durable workflow execution.

Trends Found in this Post

No tracked trend matches for this post yet.

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.