Every author of the free software obviously has rights to full control of the scope of their project. That being said, I regret that we have switched from good_job ( https://github.com/bensheldon/good_job ). The thing is - Basecamp is a MySQL shop and their policy is not to accept RDMS engine specific queries. You can see in their issues in Github that they try to stick "universal" SQL and are personally mostly conce…
> their policy is not to accept RDMS engine specific queries Why? Is it so they can switch in future?
I’m leaving Redis for SolidQueue
61–70 of 146 posts
Re: I’m leaving Redis for SolidQueue
#62Every author of the free software obviously has rights to full control of the scope of their project. That being said, I regret that we have switched from good_job ( https://github.com/bensheldon/good_job ). The thing is - Basecamp is a MySQL shop and their policy is not to accept RDMS engine specific queries. You can see in their issues in Github that they try to stick "universal" SQL and are personally mostly conce…
Re: I’m leaving Redis for SolidQueue
#63Earlier quoted context omitted.
the problem i see here is that we end up treating the background job/task processor as part of the production system (e.g. the server that responds to requests, in the case of a web application) instead of a separate standalone thing. rails doesn’t make this distinction clear enough. it’s okay to back your tasks processor with a pg database (e.g. river[0]) but, as you indirectly pointed out, it shouldn’t be the same…
> it shouldn’t be the same as the production database Why is that?
If your task is to send an email, do you want to send it again? Probably not.
Re: I’m leaving Redis for SolidQueue
#64Postgres will eat the world
Re: I’m leaving Redis for SolidQueue
#65Re: I’m leaving Redis for SolidQueue
#66Earlier quoted context omitted.
> it shouldn’t be the same as the production database Why is that?
If you need to restore the production database do you also want to restore the task database? If your task is to send an email, do you want to send it again? Probably not.
In fact, I'd rather it did happen at the same time as production, so I don't have to reconcile a bunch of data on top of the tasks.
Re: I’m leaving Redis for SolidQueue
#67For people that does not think it scales. A similar implementation in Elixir is Oban. Their benchmark shows a million jobs per minute on a single node (and I am sure it could be increased further with more optimizations). I bet 99,99999% of apps have less than a million background jobs per minute. https://oban.pro/articles/one-million-jobs-a-minute-with-oba...
This benchmark is probably as far removed from how applications use task queues as it could possibly be. The headline is "1 million jobs per minute", which is true. However... - this is achieved by queuing batches of 5000 jobs , so on the queue side this is actually not 1 million TPS, but rather 200 TPS. I've never seen any significant batching of background job creation. - the dispatch is also batched to a few hundr…
They spend some time explaining how to tune the job runners to double the 17k jobs/s. The article is kind of old, Elixir 1.14 was a while ago, and it is basically a write-up on how they managed a bit of performance increase by using new features of this language version.
Re: I’m leaving Redis for SolidQueue
#68Exactly what https://www.amazingcto.com/postgres-for-everything/ says; keep it simpel and use PostgreSQL.
How much latency could you really be saving versus introducing complexity?
But I am not a storage/backend engineer, so maybe I don't understand the target use of Redis.
Re: I’m leaving Redis for SolidQueue
#69For people that does not think it scales. A similar implementation in Elixir is Oban. Their benchmark shows a million jobs per minute on a single node (and I am sure it could be increased further with more optimizations). I bet 99,99999% of apps have less than a million background jobs per minute. https://oban.pro/articles/one-million-jobs-a-minute-with-oba...
Re: I’m leaving Redis for SolidQueue
#70Every time some production environment can be simplified, it is good news in my opinion. The ideal situation with Rails would be if there is a simple way to switch back to Redis, so that you can start simple, and as soon as you hit some fundamental issue with using SolidQueue (mostly scalability, I guess, in environments where the queue is truly stressed -- and you don't want to have a Postgres scalability problem be…
That's largely the case.
Rails provide an abstracted API for jobs (Active Job). Of course some application do depend on queue implementation specific features, but for the general case, you just need to update your config to switch over (and of course handle draining the old queue).