11 min readBy The dialque Team
Building a dialer on Postgres: lessons from 50M calls
You do not need Cassandra. With careful schema, partitioning, and SKIP LOCKED, Postgres handles a serious dial workload at a fraction of the cost.
EngineeringPostgres
The work queue is the hot path. We model it as a single table partitioned by day, with a partial index on (status, next_attempt_at) where status = 'queued'. Workers pull batches with FOR UPDATE SKIP LOCKED — no Redis, no Kafka, just Postgres doing what it is good at.
Call events go to a separate append-only table partitioned by week. We aggregate to a daily rollup table on the hour. The rollup is what every dashboard reads from; the raw events are kept 90 days then archived to object storage.