why should we use restify?

This is just to share an experience I had while trying out the restify framework in node.js. I had a requirement to build a REST API in node.js and was thinking a lighter framework than express.js should be chosen to achieve better performance. It was that time we came across the restify which was advocating the same advantages over express.js.

In fact the “Why use restify and not express?” in their home page was giving more than one reason why everyone should choose restify if the intention is to build a Restful API. In fact the exposed methods of the framework actually resembles those of express.js and leads someone to believe that it was something made by refining express.js to build a custom tool for Restful services.

Just to get more assurance i just decided to test out the performance of both under a specified load and made two separate node apps with a simple post route.

The result that came out is worth to mention.

when i applied a sample load of 200 post requests per sec to the app running on restify, the app processed the requests for few seconds and then went non responsive to the requests. When I tested out the same load with the app on express it worked fine even on loads above 2000 requests per second.

It is true that there are various places on web where the performance flaws of restify are discussed, but those are some what old to confuse people that the framework is flawless now and the issues are sorted out. Consider the graphs on this page for an example.

The author himself quotes : “note, this chart is out of date since Restify performance issues were resolved”

But now after testing out and comparing the performances i felt the issues are still there. I have put the same as a stackoverflow question so that its open for a discussion. The node.js daemon code i used for applying the load is also posted along with the question.

May be i am wrong some where , but I would suggest a proper performance comparison before you make your choice for restify.