Why you should not use NodeJS

Hello everyone,

I’ll be taking you through NodeJS from a different perspective. Currently, NodeJS is being “fanboyed” by tons of fanboys and have a lot of bias articles out there to promote the use of NodeJS. Therefore, I see a really strong need for this article to be written.

Here’s a brief introduction of how I knew about NodeJS. Words on the Internet spread really fast and I was told that NodeJS was great. At first, I believed the rumors. Then I used NodeJS and found it very easy to built web socket web pages through Express.js and Socket.IO. It was fine until I read through some of the NodeJS code and saw the horror…

First off, you will need to answer this question, why should you even use NodeJS? Most of you would answer asynchronous Input/Output capabilities provided through libuv. I would not consider that an advantage at all and would even consider it a sneaky move by NodeJS developers. Asynchronous I/O is a “hack” to make NodeJS seems like it has multi-threading ability via “eventing” but as a matter of fact, NodeJS is single threaded. Some may argue that the code is executed through multi-threading at the C/C++ level. However, they forget the fact that at the Javascript level, the code is still being executed through a single thread. Others argue that NodeJS is more resource efficient because it is single threaded but this comes with a great drawback, it will not scale better than the traditional thread-per-request model.

So folks usually solve this “invisible” single threading problem by running multiple NodeJS servers within a physical server and then load balancing the traffic in between these NodeJS servers. This means that another web server, typically Nginx or Apache, has to come into place to proxy and do the load balancing! Hahaha, how hilarious and how stupid NodeJS is! Oh and some may also argue that multi-threaded code is incredibly hard to debug, I have to agree. Its definitely easier to write code than to read code, so leave that to the professionals at Apache to do it while NodeJS developers can continue writing their single threaded codes.

There is absolutely no reason for you to use NodeJS, other than it being easy to execute web socket stuff. Other languages such as PHP, Ruby and Python can do that too but its slightly more difficult. It is not sane to sacrifice multi-threading functionality just for the sake of convenience.

By now, you should be able to observe and recognise that all of these problems are mainly caused by a single issue – the use of Javascript. Hence, NodeJS is definitely not “the future” as claimed by the NodeJS fanboys but rather, a fad that will die out as time passes by. However, this might change if NodeJS developers solve the above issues but that is almost impossible as of now.

Author: Woo Huiren

Currently a student at National University of Singapore. I contribute to opensource projects - primarily PHP and Angular related. I write about PCF and PWS related stuff too.

One thought on “Why you should not use NodeJS”

  1. Hi,

    Currently I am trying to learn web development via Udemy and I have only abit of experience in web dev. The instructor of the online course uses Node.js to teach….. kinda wonder what’s the difference between these JS thingies. NodeJS, AngularJS, ReactJS, PassportJS, VueJS….. too many JS until I become headache haha….. what is your opinion on this?

    – Aydil
    Information Technology | Year 2 | Ngee Ann Poly | Cloud Computing

Leave a Reply