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 8380459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:27:50+00:00 2026-06-09T16:27:50+00:00

I have a Rails application that does a lot of media encoding. I am

  • 0

I have a Rails application that does a lot of media encoding. I am handling it via background processes, but I see that CPU gets overloaded and the front end loading times are definitely slower than they should be (or were before the back end part became bigger).

So the problem: Rails app with media encoding features experiences CPU loads and front-end slowed down. Goal – decouple front-end and back-end (media encoding) part.

Question – what is the best approach to split an existing application into two parts (front-end part and back-end part)?

1) Is it a good idea to run two copies of app on two servers and make calls between then POSTing/PUTting information via HTTP (or connecting to a remote db)?

2) Is it a good idea to keep the CPU-intesive part wrapped up in Rails code, or should I aim to strip it off the Rails functionality?

If someone can point to a good guide on running multi-server Rails application, that would be great (search returns questions on multi-server Capistrano deployment, but I need some less specific recipes).

  • 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-09T16:27:52+00:00Added an answer on June 9, 2026 at 4:27 pm

    A common approach that works well is to use a work queue like Resque.

    Managing the code
    For ease of management, keep the processing code and the app “in the app”.
    Deploy two app-servers but run resque workers on the processing server.

    State changes
    If the processing jobs relate to ActiveRecord persisted objects you can poll state from the front-end and periodically update it from the backend during the encoding process.

    You might find it useful to use state machine.

    Your problems have moved
    Now you’re cloud-scale™ 😀
    More processing hosts running workers can be added if your queue gets too long. If your front-end is the only web-accessible host you can set up a rack middleware or run rainbows to proxy the processed results through the frontend to the client.

    Sounds like an interesting project. Good luck!

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

Sidebar

Related Questions

In my rails application, I have a background process runner, model name Worker, that
I have a rails application that helps users submit articles. Does any one know
Background I'm running a Ruby on Rails application that has to serve a lot
I have a Rails application that accepts file uploads of CSV files. When developing
I have a rails application that about 3 years old, and I'm having a
I have a Rails application that uses ActiveRecordStore for sessions. I need a PHP
I have a Rails application that lists information about local services. My objectives for
I have a rails application that allows searches using longitude and latitude. I have
I have a Rails application that works with mongodb. I want to deploy it
I have a rails application that has three different types of users and I

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.