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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:19:24+00:00 2026-06-12T20:19:24+00:00

I’m testing out nodejs (0.8.11). with the following server app: var http = require(‘http’);

  • 0

I’m testing out nodejs (0.8.11).

with the following server app:

var http = require('http');
http.createServer(function (req, res) {
    console.log('hit!');
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

I ran apache benchmark:

ab -r -v 4 ‘http://127.0.0.1:1337/’

I get the following output:

hit!
hit!
hit!
hit!
hit!
hit!
hit!
hit!
hit!
... (alot more)

output from ab:

Benchmarking 127.0.0.1 (be patient)...INFO: POST header == 
---
GET / HTTP/1.0
Host: 127.0.0.1:1337
User-Agent: ApacheBench/2.3
Accept: */*


---
LOG: header received:
HTTP/1.1 200 OK
Content-Type: text/plain
Date: Thu, 11 Oct 2012 06:40:04 GMT
Connection: close

Hello World

LOG: Response code = 200
..done


Server Software:        
Server Hostname:        127.0.0.1
Server Port:            1337

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      1
Time taken for tests:   0.009 seconds
Complete requests:      1
Failed requests:        0
Write errors:           0
Total transferred:      113 bytes
HTML transferred:       12 bytes
Requests per second:    115.05 [#/sec] (mean)
Time per request:       8.692 [ms] (mean)
Time per request:       8.692 [ms] (mean, across all concurrent requests)
Transfer rate:          12.70 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        8    8   0.0      8       8
Processing:     0    0   0.0      0       0
Waiting:        0    0   0.0      0       0
Total:          9    9   0.0      9       9

and thinking the default number of requests isn’t 1 as is specified in ab manual, i tried:

ab -v 4 -n 1 -c 1 'http://127.0.0.1:1337/'

I get the same output (alot of ‘hits!’ in the log)

What is going on here?

This is specific to node, I’ve tried the same with my jetty app, with ab -c 1 -n 1, there was only 1 recorded hit…

NOTE: I have tried with curling the node service – only 1 ‘hit!’ in the log…

  • 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-12T20:19:26+00:00Added an answer on June 12, 2026 at 8:19 pm

    I have also posted this in the nodejs google group. Apparently this is a bug in the macosx lion version of apache / ab.

    Original reply from the nodejs group:

    https://groups.google.com/d/msg/nodejs/OqVZ4zPbqp0/DitO9xkmFOUJ

    Also here is the direct link to the related page describing the problem.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I know there's a lot of other questions out there that deal with this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;

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.