When comparing Mach vs Restify, the Slant community recommends Restify for most people. In the question“What are the best node.js web frameworks?” Restify is ranked 9th while Mach is ranked 11th. The most important reason people chose Restify is:
DTrace helps you with troubleshooting and building robust RESTful applications.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Streaming
Mach has some pretty cool streaming functionalities built directly into it, if your web app provides any audio/video/data streaming features, you can consider using Mach to build it.
Pro Composability
Since Mach already is asynchronous (stateless) which means your logic is implemented by using promises (then objects
); hence your functions are pretty independent and composable.
Pro Simplicity
No complex layers between plain HTTP requests and the corresponding JS functions invoked. Which in turn means each GET/POST/PUT or any other HTTP request is directly mapped to a Javascript function. Hence leading to a huge increase in performance for your app
Pro Robust
One of the distinguishing features of Mach is it's robustness, errors won't be terminating your complete app, instead they'll bubble up so you can handle them gracefully.
Pro Asynchronous
Like most of the Node.js's core, Mach is an asynchronous web framework too. Each response (of a request) can simply be hooked up to a then
method so that its result or the reason for failure can be retrieved after the action is complete. If you're wondering what async operations are, here's a pretty good explanation for you
Pro Automatic DTrace support
DTrace helps you with troubleshooting and building robust RESTful applications.
Pro Specialized for Restful APIs
As the name suggests, Restify is devoted solely to creating an elegant REST API. The API is the core of your site or service, so it makes sense to use a framework that excels at that.
Cons
Con Performance is not very optimum
As most of the benchmarks have already revealed, for large inflows of traffic, apps powered by Restify perform below par and are easily beaten by Express.js in terms of load time (in heavy traffic).