Turning PostgreSQL into a queue serving 10k jobs per second (2013)
1–10 of 146 posts
Re: Turning PostgreSQL into a queue serving 10k jobs per second (2013)
#2Re: Turning PostgreSQL into a queue serving 10k jobs per second (2013)
#3Re: Turning PostgreSQL into a queue serving 10k jobs per second (2013)
#4How does this compare to Redis? Seems like Redis would handily beat it.
> So, many developers have started going straight to Redis-backed queues (Resque, Sidekiq) or dedicated queues (beanstalkd, ZeroMQ...), but I see these as suboptimal solutions - they're each another moving part that can fail, and the jobs that you queue with them aren't protected by the same transactions and atomic backups that are keeping your precious relational data safe and consistent. Inevitably, a machine is going to fail, and you or someone else is going to be manually picking through your data, trying to figure out what it should look like.
I disagree though. BLPOP is far easier to grok than any Postgres solution and Redis is rock-solid. Either using the new Redis streams or a good queueing library is going to guarantee you don’t miss any jobs and have a need for transactions across both systems either.
I would also be very hesitant to add work to my database. That’s often a sensitive part of systems.
Re: Turning PostgreSQL into a queue serving 10k jobs per second (2013)
#5Re: Turning PostgreSQL into a queue serving 10k jobs per second (2013)
#6How does this compare to Redis? Seems like Redis would handily beat it.
It's well designed so that when you do venture into territory where you need a specialized solution it's not difficult to replace. But you'll definitely miss ACID and relational data if you're leveraging them.
There is a great operational economy to making Postgres your default solution for these sorts of problems.
Re: Turning PostgreSQL into a queue serving 10k jobs per second (2013)
#7How does this compare to Redis? Seems like Redis would handily beat it.
The author addresses Redis: > So, many developers have started going straight to Redis-backed queues (Resque, Sidekiq) or dedicated queues (beanstalkd, ZeroMQ...), but I see these as suboptimal solutions - they're each another moving part that can fail, and the jobs that you queue with them aren't protected by the same transactions and atomic backups that are keeping your precious relational data safe and consistent.…
Edit: oh, someone mentioned this being from 2013. No Redis Streams back then.
Re: Turning PostgreSQL into a queue serving 10k jobs per second (2013)
#8How does this compare to Redis? Seems like Redis would handily beat it.
Re: Turning PostgreSQL into a queue serving 10k jobs per second (2013)
#9How does this compare to Redis? Seems like Redis would handily beat it.
> many developers have started going straight to Redis-backed queues (Resque, Sidekiq) or dedicated queues (beanstalkd, ZeroMQ...), but I see these as suboptimal solutions - they're each another moving part that can fail, and the jobs that you queue with them aren't protected by the same transactions and atomic backups that are keeping your precious relational data safe and consistent
Re: Turning PostgreSQL into a queue serving 10k jobs per second (2013)
#10How does this compare to Redis? Seems like Redis would handily beat it.
Postgres is not best in class in many things it does well but it suits the needs most people will actually encounter in the wild while being built on a rock solid foundation. It truly is a fantastic hammer for every nail involving data integrity or synchronization. It's well designed so that when you do venture into territory where you need a specialized solution it's not difficult to replace. But you'll definitely m…