

Ask HN: How many req per second can a single mongrel server handle of RoR app. - digamber_kamat

I have a RoR app running a simple hello world program running on a single instance of Mongrel as app container and apache as web server.&#60;p&#62;Its a dual core machine with 2 GB of RAM&#60;p&#62;Can I expect it to handle 150 req. per second?
======
oldgregg
Maybe not the best place to post this... but it depends on how long each
request takes. If it's 100ms/avg then a single mongrel thread can do
~10req/sec. Mongrels are single-threaded which is why you usually see 5+
instances. If you are caching so it hits apache and not the mongrel than
potentially much higher. If you can switch to nginx passenger though, do it.
Much faster and cleaner.

------
Zarathu
One.

Use Passenger.

------
mahmud
FWIW 150 requests per second is peanuts. If your server doesn't reach the mid
2000s serving a typical index page (static or otherwise, at about 4kb)
_without_ caching or tweaking, I say ditch it. Life is too short for lousy web
servers. Nginx gets 8k out of the box, lightty about 6k or so.

~~~
sunkencity
no way you can get a rails app to send 6k requests per second on a single
machine. A full page cached page, yes, but no way on rails.

------
mark_l_watson
Use the Apache Benchmark "ab" program, and measure the number of requests per
second for your application.

It is number of requests per second that should interest you.

If you do not have ab installed, try:

sudo apt-get install apache2-utils

then:

man ab

------
sunkencity
try benchmarking with apachebench

ab -n 10000 -c 10 <http://127.0.0.1/>

or install siege (or some other tool).

Use passenger. If you really need speed use rails metal to write your
response, rails metal can certainly handle 150 requests per second on a single
instance. But should one client be laggy, it will take down the whole server
:)

------
Shamiq
OFF TOPIC:

To add blank lines in your text output here in HN, hit return twice (\n\n).

~~~
jacktasia
I think there's a bug in Hacker News where it will convert new lines to an
html p and place it back in the text box if there is an error submitting the
form (like your title is too long). Instead of waiting for a successful
submission to convert the new lines. That said, this is purely speculation
based on my experiences.

~~~
ismarc
Confirmed bug. To reproduce: 1) Set title to "Ask HN: Attempting to confirm a
bug... aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaa"

Set text to: "here is text

Enter pressed twice, I have not inserted any html tags

If this doesn't error and instead posts it, I apologize."

Click submit. Observe text in the box "text" has changed to: "here is
text<p>Enter pressed twice, I have not inserted any html tags<p>If this
doesn't error and instead posts it, I apologize."

