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

  • SEARCH
  • Home
  • 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 9100363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:50:45+00:00 2026-06-17T00:50:45+00:00

I have an app… The app does a market comparison for a financial product

  • 0

I have an app…

The app does a market comparison for a financial product – for a given quote request, it contacts several other sites for their quotes. It then gives the user the results – several quotes for their details.

To manage these requests they get saved to MySQL and then my app kicks in, picking up the pending quotes and farms these out to threads (all same Linux box) to process each site lookup.

I am using JRuby as I had thread/db related issues. Using Java threadpools to control the number of threads. With the current hardware/VPS – it can handle around 200 threads. A lot of the limitations seem to relate to each thread grabbing their own MySQL connection – grabbing the quote details and saving back the results. We want to handle more concurrent threads and so looking for ways to scale up.

Wondering which way to go …

  1. Bigger hardware…
  2. More machines and use some kind of queueing
    mechanism (with priorities) to share the load across the machines –
    so the threads dont touch the db, all the details/responses go via
    the queue – so the DB hit is less, but then maybe I am just pushing
    the problem into the queue. Thinking of using something like
    MongoDB for the queue, but open to suggestions – something easy to
    use with Ruby 🙂
  3. Some kind of remote/RPC mechanism, eg dRb –
    theoretically this seems like a good option, but not done anything
    with this yet to know how complex it will make things.
  4. Something
    else…?

From this link Reasons for NOT scaling-up vs. -out? – it would seem this problem is suited to running more machines to solve it.

So, any thoughts on which way to go…

Cheers,
Chris

  • 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-06-17T00:50:47+00:00Added an answer on June 17, 2026 at 12:50 am

    My usual approach to problems like this is to pay very close attention to the database queries you’re making and tune them aggressively. Retrieve only what you need, skipping columns that aren’t explicitly used, and be very careful about eager loading things you don’t need in their entirety.

    You’ll often find you can get significant speed gains by adding indexes, or strategically de-normalizing certain attributes in your database to avoid ugly, time-consuming JOIN operations.

    Further, think about caching: The fastest database call is the one that’s never made. It’s not hard to leverage in something like Memcached to save the results of a moderately time-consuming record retrieval and if done carefully it’s even easy to invalidate and expire this provided you channel your updates through a few methods.

    For scheduling workers, a simple first-in, first-out queue can be implemented in Redis to off-load a lot of the processing overhead from MySQL itself. This is usually very simple to add if you follow an example.

    A cache like Memcached can handle an extremely high amount of traffic, so whenever possible, cache against this to avoid hitting your database for every last thing.

    If you’ve exhausted these options, it’s time for more front-end servers and even more database capacity, but only then.

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

Sidebar

Related Questions

I have app with two sites, one where design is done and other which
I have app with several entity. During deploying on JBoss AS7 I occur exception
My case: I have an app.exe and several dlls for it -- a.dll, b.dll,
we have app hosted on google app engine for java. In this app we
I have app.config in m win application, and loggingConfiguration section (enterprise library 4.1). I
We have App A as main app. Now we build from it App B
I have app in which i have recorded sound files i want that i
lets say i have app id, app secret id and user uid now i
for example: I have app A, which references library A and library B. in
have an app that finds your GPS location successfully, but I need to be

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.