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
Benchmarking Express.js App
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
 
Gustavo Machado  
View profile  
 More options Nov 2 2012, 4:42 pm
From: Gustavo Machado <machad...@gmail.com>
Date: Fri, 2 Nov 2012 17:41:37 -0300
Local: Fri, Nov 2 2012 4:41 pm
Subject: Benchmarking Express.js App

Hi,

I would like to start a series of benchmarks of a few apps we have running
with node.js so I decided to run a baseline benchmark on a vanilla
express.js application with the following route:

app.get('/', function ( req, res ) {
  res.end("hello world");

});

I ran ApacheBench like this:
.\ab.exe -n 100 http://one.org:3000/
.\ab.exe -n 100 -c 10 http://one.org:3000/
.\ab.exe -n 100 -c 100 http://one.org:3000/

(one.org is mapped in my hosts file to an EC2 Large instance)

I repeated the tests several times, and results were pretty consistent:
https://gist.github.com/4004085

So my questions are, do these numbers make sense? And is this suggesting
that in the last test one request was waiting for 24 seconds? Why?

Is there a better way to benchmark an express.js app?

Thanks,
Gustavo


 
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.
tjholowaychuk  
View profile  
 More options Nov 3 2012, 1:09 am
From: tjholowaychuk <tjholoway...@gmail.com>
Date: Fri, 2 Nov 2012 22:09:24 -0700 (PDT)
Local: Sat, Nov 3 2012 1:09 am
Subject: Re: Benchmarking Express.js App
yikes those numbers are terrible something is really wrong there.
secondly responses will be much slower if you dont specify
the Content-Length, (use res.send('hello world')), but yikes yeah
something is very wrong with that, normally you would have to
explicitly try to make express that slow, so either the network hops
are brutal or something else is wrong

On Nov 2, 1:42 pm, Gustavo Machado <machad...@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.
Joel Rolfe  
View profile  
 More options Nov 3 2012, 10:39 am
From: Joel Rolfe <jro...@gmail.com>
Date: Sat, 3 Nov 2012 07:39:53 -0700 (PDT)
Local: Sat, Nov 3 2012 10:39 am
Subject: Re: Benchmarking Express.js App

Yeah, something is clearly wrong here - if you haven't already, you might
use the express logger middleware to measure time spent server side
handling the request.  Add something like this (this is what I'm using -
modify your desired fields accordingly) to the beginning of your express
middleware chain:

app.use(_express.logger(':remote-addr [:date] ":method :url
HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"
[ :response-time ms ]'));

You'll have to look at individual requests on your stdout, but at 2
requests a second, this shouldn't be too hard ;).  


 
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 »