Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails background/async task requirement

We have a rails v2.3.8/apache/passenger application & have async requirements for some long running tasks. So I have been evaluating some solutions around rails/ruby, wanted to get feed back on some of the solutions.

Also I had one question - on how do the background tasks/workers get spawned. Given our rails app will run inside a apache/passenger container, does that mean the background/workers will also spawn a apache/passenger process/thread??

Is there only one worker thread/process that is launched, which would mean that the jobs will be processed serially or the jobs are processed in parallel? I come from java/j2ee background so I have good understanding of Message Beans/threading, but have no clue on how rails messaging solutions work?

Some of the parameters based on which we are evaluating the following solutions are - Performance/Scale, Distributed workers (running on separate nodes), Rails v3 support

  • Beanstalkd -> async-observer

  • Startling -> Workling

  • ActiveMQ(stomp) -> Workling/activeMessageing

  • Delayed JOB

like image 824
kapso Avatar asked Jun 14 '26 13:06

kapso


1 Answers

Phusion Passenger only handles web requests. Background tasks are best handled by an external queue system. You've already mentioned some of them. These queue systems run as completely separate processes and don't affect any processes that Phusion Passenger manages.

like image 127
Hongli Avatar answered Jun 16 '26 01:06

Hongli