Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7446515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:20:10+00:00 2026-05-29T12:20:10+00:00

We’re working on a Rails project on Heroku that needs to scrape and process

  • 0

We’re working on a Rails project on Heroku that needs to scrape and process data each night for each user. This requires many Internet accesses per user, and we’re hoping to be able to support tens of thousands of users. While there’s a fair bit of parsing, calculating, and writing to databases involved, we expect that most of the task’s time will be spent waiting on data from the network.

What’s the best general approach to doing this task while minimizing both wallclock time and Heroku fees? Obviously either concurrency or async networking will be needed to take advantage of the time spent waiting for the network, but how should we go about it? We’re thinking in terms of a database-backed queue with forked worker processes, but that may not be the best approach—or may not even be possible on Heroku.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:20:11+00:00Added an answer on May 29, 2026 at 12:20 pm

    Heroku supports Delayed Job, I would start there. You can then do the following:

    • create a job class that does the processing for a single user
    • schedule a nightly cron that creates a job for every user in your system
    • auto-scale your workers to accommodate the job queue (workless or similar should be able to do this for you. If not, you may have to roll some custom code.)

    You’ll need to play with your workers/jobs ratio to figure out the sweet spot for optimizing across db load, wallclock time and heroku costs.

    If you’re finding that each job spends too much time sitting around waiting for network, take a look at eventmachine. Jobs are just ruby code, so you can play whatever parallelization tricks you want here, Heroku shouldn’t limit you in any way.

    This setup would be a pretty good baseline to get to as it shouldn’t take very long to spin up and you’ll probably learn a bit about your work load from it.

    You might find out that 1 job/user doesn’t make sense, and that you need n jobs per user (one job per property or something). Without knowing your exact usecase it’s hard to say up front, that’s why I’m assuming a 1-1 mapping.

    I should also point out that the new Heroku stack supports queueing systems other than Delayed Job (scroll to bottom).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.