zlacker

[return to "Do you really need Redis? How to get away with just PostgreSQL"]
1. nickjj+Tg[view] [source] 2021-06-12 10:13:32
>>hyzyla+(OP)
I think one of the biggest advantages of using Redis for job queing vs Postgres comes down to library support.

For example Python has Celery and Ruby has Sidekiq. As far as I know there's no libraries in either language that has something as battle hardened with comparable features for background tasks using Postgres as a backend.

There's a big difference between getting something to work in a demo (achievable by skimming PG's docs and rolling your own job queue) vs using something that has tens of thousands of hours of dev time and tons of real world usage.

I'm all for using PG for things like full text search when I can because it drastically reduces operation complexity if you can avoid needing to run Elasticsearch, but Redis on the other hand is a swiss army knife of awesome. It's often used for caching or as a session back-end so you probably have it as part of your stack already. It's also really easy to run, uses almost no resources and is in the same tier as nginx in terms of how crazy efficient it is and how reliable it is. I don't see not using Redis for a job queue as that big of a win.

◧◩
2. trulyr+lY[view] [source] 2021-06-12 17:28:57
>>nickjj+Tg
In the case of Python, Celery does support SQLAlchemy as a broker if I remember correctly. So in theory, you could still use PostgreSQL and also have a solid queue library.
◧◩◪
3. nickjj+vr1[view] [source] 2021-06-12 22:05:01
>>trulyr+lY
It is supported but it's classified as experimental and not officially maintained by the core devs based on their documentation.
[go to top]