Our internal admin product had a typical small-team stack: one Postgres primary with a replica, one Redis instance, three app servers, and a worker pool. Redis did three jobs: a response cache for expensive dashboard queries, a job queue, and pub/sub to push "report ready" events to websocket servers. It also produced most of our on-call pages that year, mostly memory eviction surprises and a failover that dropped queued jobs. We ran an experiment: could Postgres, which we already back...
When Postgres is enough: replacing Redis for cache, queue and pub/sub
We removed Redis from a mid-sized SaaS stack and moved its cache, job queue and pub/sub into Postgres. Here is the schema we used, the limits we measured, the traps we hit, and the signals that tell you to bring Redis back.
This is a paid story
Subscribe to read the full content, access all paid stories, and support the authors.
Add a label
Embed this post
<iframe src="https://www.hibug.me/postgres-replaces-redis-queue-cache-pubsub" width="700" height="420" frameborder="0" loading="lazy"></iframe>
I am a Senior Software Engineer with over a decade of hands-on experience building, scaling, and maintaining complex systems across the full stack—spanning frontend, backend, and DevOps. Over the last 10 years, I have navigated diverse architectures and untangled some of the most frustrating, elusive bugs in production. I believe that every production incident is a massive learning opportunity. Having discovered hibug.me, I am excited to contribute to this knowledge base, breaking down root causes, and sharing verified fixes to help fellow developers debug faster and build more resilient systems.
Comments
0No comments yet. Be the first to comment!
Sign In to post a comment.