Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
my single-threaded Rails app handling concurrent requests?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Bachir  
View profile  
 More options Apr 1 2012, 10:26 am
From: John Bachir <johnjosephbac...@gmail.com>
Date: Sun, 1 Apr 2012 07:26:16 -0700 (PDT)
Local: Sun, Apr 1 2012 10:26 am
Subject: my single-threaded Rails app handling concurrent requests?

I have a single-threaded Rails app running on thin in single-threaded mode
on Heroku Cedar.

While I do a huge POST request (a file upload) that takes more than a
minute, I can do other GET requests at the same time.

Heroku support assures me that their routing layer is not storing the
request and then sending it all at once (which is the behavior of many
proxies, such as nginx). They insist that my app is handling concurrent
requests.

I posted this question on Stack Overflow [1] and someone proposed this:

Thin is built on top of EventMachine, which provides event-based IO.

So, I suspect, Thin does async receiving of your POST request, while

> serving GET requests in the meanwhile. When POST data is uploaded, Thin
> then goes on to pass it to Rails.

Is that the case?

Thanks,
John

[1]
http://stackoverflow.com/questions/9962611/how-is-my-single-threaded-...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc-André Cournoyer  
View profile  
 More options Apr 3 2012, 8:59 am
From: Marc-André Cournoyer <macourno...@gmail.com>
Date: Tue, 3 Apr 2012 08:59:06 -0400
Local: Tues, Apr 3 2012 8:59 am
Subject: Re: my single-threaded Rails app handling concurrent requests?

Thin can receive and parse the request asynchronously and concurrently. But
once it reaches the Rack app inside, it is the job of the app to handle
things in an asynchronous maner to be able to handle concurrency.

So while the file is uploading to your server it will be able to handle
other requests. But if you app takes a long time to process that app (in
Ruby code) you will block other requests during that time.

On Sun, Apr 1, 2012 at 10:26 AM, John Bachir <johnjosephbac...@gmail.com>wrote:

--
M-A
http://macournoyer.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Joseph Bachir  
View profile  
 More options Apr 3 2012, 9:51 am
From: John Joseph Bachir <johnjosephbac...@gmail.com>
Date: Tue, 3 Apr 2012 09:51:25 -0400
Local: Tues, Apr 3 2012 9:51 am
Subject: Re: my single-threaded Rails app handling concurrent requests?

Okay- great to hear. I wonder how thin compares to other servers in this regard. If it's unique, then that gives it a nice advantage in the heroku cedar environment where there is no proxy.

On Apr 3, 2012, at 8:59 AM, Marc-André Cournoyer <macourno...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »