Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Express JS vs pure Node.js - performance benchmarks?

I have a question - does anyone has any benchmark data re. using Express JS framework vs pure Node.js?

Is this something that even should be considered -- or using Express or similar framework is definitely a MUST if you're building a more or less large web app?

like image 821
mvbl fst Avatar asked Jun 08 '12 17:06

mvbl fst


People also ask

How much faster is Fastify than Express?

Fastify claims to be the fastest web framework around. Benchmarks back up their claim with Fastify performing nearly twice as fast as Express in a simple 'hello world' overhead benchmark. The only case where Fastify falls behind Express is in handling empty requests.

Is Restify better than Express?

ExpressJS and Restify belong to "Microframeworks (Backend)" category of the tech stack. ExpressJS and Restify are both open source tools. It seems that ExpressJS with 44.6K GitHub stars and 7.48K forks on GitHub has more adoption than Restify with 9.31K GitHub stars and 957 GitHub forks.

How fast is ExpressJS?

Express — 367,069 responses per second with an average latency of 354.1 ms.


2 Answers

EDIT:

The article I linked to below disappeared, and I couldn't find it after searching around a bit. However, in lieu of that, here are a couple of relevant references with sufficiently scientific benchmarks:

  • https://github.com/koajs/koa/blob/master/docs/koa-vs-express.md#is-koa-faster-than-express
  • http://serdardogruyol.com/?p=111
  • http://qzaidi.github.io/2013/07/20/surprises/

Although this doesn't answer the delta part of your question, there's some absolute statistics about ExpressJS performance here:

Updated Link

http://blog.perfectapi.com/2012/benchmarking-apis-using-perfectapi-vs-express.js-vs-restify.js/

Looks like, on a small Amazon instance, Express averages:

a very respectable 1,600-1,700 requests per second

like image 53
mikermcneil Avatar answered Oct 27 '22 17:10

mikermcneil


Express is a convenience wrapper around node.js, and should not add much latency to your server; your code would probably go through many of the same steps anyway. That being said, if your load tests (or hapless customers) find the server is too slow and/or not scalable, then you should profile at that time, and the bottleneck probably won't be Express.

BTW, even though Express calls itself "high performance", they're naughty for not posting measurements.

like image 38
Yusuf X Avatar answered Oct 27 '22 18:10

Yusuf X