37

I've searched a lot about stress testing a NodeJs application/module but I didn't find anything.

I have a push server application (something like socket.io) and I want to test it to ensuring there's no memory leaks and that it exhibits optimal performance.

What's the best method or tools for doing that?

Afshin Mehrabani
  • 33,262
  • 29
  • 136
  • 201
  • 2
    i've used [funckload](http://funkload.nuxeo.org), it is written in python and has nice benchmarks, and [siege](http://www.joedog.org/siege-home/). You also can find some nice posts like [this](http://stackoverflow.com/questions/7492/how-do-you-stress-test-a-web-application) too. Hope this will help – Peter Gerasimenko Jan 22 '13 at 17:13
  • Here you can find some code developed for benchamrking Node + Socket.IO: https://github.com/Weswit/Lightstreamer-toolkit-socket.io-benchmark – Alessandro Alinone Oct 07 '13 at 10:18

2 Answers2

30

You do not need any special tool for load testing Node.js application. You can use any load test tools:

From opensource and free tools I can recommend JMeter. As it has built-in Proxy Server which can record HTTP traffic. Advantage of JMeter than other tools is user friendly GUI. You can find article related Node.js load balancing and JMeter testing.

Bob Meliev
  • 1,198
  • 12
  • 17
  • Look: http://strongloop.com/ It is special for Node.js and payment, but has its trial version. – alditis Apr 25 '14 at 00:35
  • I used JMETER and found that Nodejs can handle upto 1000 request , I am using windows server 2012 with 8 gb RAM intel XEON – user3280472 Jun 28 '16 at 17:29
3

Try this phanos stress test tool. This is phantomjs based tool, and you can loading ajax request too with it. But this tool doesn't provide stat info, you should use nodetime (or something else) for analyze the traffic performance.

Dmitry
  • 816
  • 1
  • 9
  • 17
  • 14
    It's generally good SO etiquette to indicate that you wrote the software that you're promoting. Otherwise it looks interesting. – Codebling Dec 09 '15 at 04:29