Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im confusing about where should I have a script polling an Aws Sqs inside a Rails application.

If I use a thread inside the web app probably it will use cpu cycles to listen this queue forever and then affecting performance.

And if I reserve a single heroku worker dyno it costs $34.50 per month. It makes sense to pay this price for it for a single queue poll? Or it's not the case to use a worker for it?

The script code:

  queue =['my_queue'])    
  queue.poll(:idle_timeout => 20) do |msg|
     # code here

I need help!! Thanks

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.