22 stats that answer, why you should learn Node.js
Tags: beginners, codenewbie, javascript, webdev
Published: 2022-07-30 11:51:06

No doubt you have heard of _Javascript_, **a dominant client-side programming language running in browsers and is used by 97.8% of all websites**.
Are you wondering where the remaining 2.2% went? Unfortunately, I am also wondering! :) 💭

### Jump to sections
- [The background](#the-background)
- [Key NodeJs stats](#key-nodejs-stats)
- [NodeJs in a (tiny) nutshell](#nodejs-in-a-tiny-nutshell)
- [NodeJs milestones](#nodejs-milestones)
  - [Why big brands are using NodeJs](#why-big-brands-are-using-nodejs)
  - [Impact and market stats](#impact-and-market-stats)
  - [Where Nodejs shines](#where-nodejs-shines)
- [Summary](#summary)

## The background

The Internet is a **cobweb of different technologies** cobbled together with duct tape, string and chewing gum. It's not elegantly designed in any way, because it's more of a **growing organism** than it is a **machine constructed with intent**.

The internet has grown popular majorly because _it is a spread of information, and it's a way for us to communicate with people who are even thousands of miles away from us_.

Slowly and gradually, Javascript _as the only client-side programming language inside of the browsers_, has benefited from the growth in popularity of the internet. Today Javascript has become a language that will be difficult to try to replace in its domain. Perhaps, Javascript will be replaced sooner or later _when pigs fly_🐖 .

For a while, _Javascript_ has been **living inside of browsers only**. For this reason, It has only been able to carry out client-side operations only. Until 2009, **Ryan Dahl**, the creator of **Nodejs**, steered Nodejs into existence. Unlocking the powers of Javascript that were _confined inside of Browser environments_, unleashing it to also **power the backend of applications**.

Nodejs has grown steadily onwards in its adoption and use. Learning Nodejs is well worth your time spent; regarding with how it is becoming a hot topic today(_as of 2022_).
Its swankiness can be seen: 😎

## Key NodeJs stats
- JavaScript is the most popular language in the world. [_See for yourself_](https://survey.stackoverflow.co/2022/#most-popular-technologies-language)
- **Amazon**, **Netflix**, **LinkedIn**, **eBay**, **Walmart**, **Reddit**, **Uber**, **Trello**, **PayPal**, ... are very productive building applications with Node JS. These are only the big names. _God knows how many startups and small scale businesses are using it too_.
- It has the largest repository of libraries (npm).
- It is very performant and does real-time applications very well and seamlessly.
- Well, sorry, but it is **FAST**! Let alone [bun js](https://bun.sh/). Tellingly, PayPal saw a 35% decrease in average response time on its page after deploying Node JS.
- You only need to master one language for frontend and backend.

## NodeJs in a (tiny) nutshell
According to [Nodejs Website](https://nodejs.org/en/)

> Node.js® is a JavaScript runtime built on Chrome's V8
> JavaScript engine.

Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser. This allows Node.js to be very performant. _I hope you have heard of the perfomant [Chrome v8 engine](https://v8.dev/)_

You may gravitate towards thinking that Nodejs was primarily built for running Javascript on the backend. But Nodejs was created with a **major intention of handling multiple requests at once**, which was difficult at the time before Nodejs. And the idea that inspired Ryan Dahl about this can be read [here](https://siliconangle.com/2013/04/01/the-birth-of-node-where-did-it-come-from-creator-ryan-dahl-shares-the-history/).

A Node.js app runs in a single process, without creating a new thread for every request.

## NodeJs milestones
Well, without further ado, let's try to quantify how huge NodeJs is, with a bias in it's impact. And therefore your time learning it will be a **time well spent**.

<ol>
<h3 id="why-big-brands-are-using-nodejs">Why big brands are using NodeJs</h3>

<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eejd442wk0kx2677q2la.png" alt="Companies using NodeJs int their tech stack" />

<li>
<strong>Netflix saw a 70% reduction in startup time on it's User Interface.</strong> <small>(<em>source: <a href="https://netflixtechblog.com/making-netflix-com-faster-f95d15f2e972">Netflix blog</a></em>)</small></li>
 
Startup times could take as long as 40 minutes. Moving to Nodejs, from a <strong>40 minutes+ startup time</strong> they went to <strong>under a minute.</strong>

<li>
<strong>Nasa improved database access time with Nodejs.</strong> <small>(<em>source: <a href="https://openjsf.org/wp-content/uploads/sites/84/2020/02/Case_Study-Node.js-NASA.pdf">Nasa nodejs case study</a></em>)</small></li>  

300% improvement in the time needed to access the database, allowing users to get desired data sets in seconds and not hours

<li>
<strong>Paypal improved web application high availability and  performance.</strong> <small>(<em>source: <a href="https://medium.com/paypal-tech/node-js-at-paypal-4e2d1d08ce4f">Paypal blog</a></em>)</small></li> 

Paypal got a foot ahead in ensuring 100% Business Availability, even with Huge traffic since the Node.js application was handling twice the number of requests per second. PayPal pages started loading 35% faster, with a decrease in response time.

<li>
<strong>Twitter built Twitter Lite with a reduced average load times by over 30%.</strong> <small>(<em>source: <a href="https://blog.twitter.com/engineering/en_us/topics/open-source/2017/how-we-built-twitter-lite">Twitter blog</a></em>)</small>
</li>

<blockquote>
Over the last 3 months we’ve reduced average load times by over 30% and 99th percentile time-to-interactive latency by over 25%
</blockquote>

<h3 id="impact-and-market-stats">Impact and market stats</h3>

<li>
<strong>Javascript is the most popular technology.</strong> <small>(<em>source: <a href="https://survey.stackoverflow.co/2022/#technology-most-popular-technologies">Stackoverflow survey 2022</a></em>)</small>
</li>

Nodejs is a runtime for Javascript. Javascript popularity is a direct relation it is one of the most <strong>sought-after</strong> skill in the tech industry. So you cannot go wrong learning it.

<li>
<strong>NodeJs is used by at least 30 million websites.</strong> <small>(<em>source: <a href="https://w3techs.com/technologies/details/ws-nodejs">w3tech</a></em>)</small>
</li>

According to w3tech:
<blockquote>
Node.js is used by 2.0% of all the websites whose web server we know.
</blockquote>

Computing % ratio of the entire internet, this means NodeJs powers at least 30 million sites, if not more.

<li>
<strong>Nodejs trumped the million boundary with its first Billion Downloads back in 2018.</strong> <small>(<em>source: <a href="https://nodejs.medium.com/more-than-a-billion-downloads-of-node-js-952a8a98eb42">nodejs Medium</a></em>)</small>
</li>

Backtracking to when the announcement was made, it was closer to 1.2 billion. Today, Node is easily around 1.4 billion with a rough estimation.

<li>
<strong><em>From 57,654 responses</em>, 16.12% of developers want to learn Nodejs.</strong> <small>(<em>source: <a href="https://survey.stackoverflow.co/2022/#most-loved-dreaded-and-wanted-webframe-want">Stackoverflow 2022 survey</a></em>)</small>
</li>

<li>
<strong>Users are very upbeat and excited about Node.js; using words like “<em>fast</em>” “<em>easy</em>” “<em>awesome</em>” “<em>simple</em>” “<em>powerful</em>” and “<em>fun</em>” to describe Node.js.</strong> <small>(<em>source: <a href="https://nodejs.org/en/user-survey-report/#Words-to-Describe-Node">2018 Node.js User Survey Report</a></em>)</small>
</li>

Users of NodeJs love using the technology.

<li>
<strong>NodeJs has an overall positive impact for bussinesses.</strong> <small>(<em>source: <a href="https://nodejs.org/en/user-survey-report/#Business-Impact">2018 Node.js User Survey Report</a></em>)</small>
</li>
Small and Medium Enterprises to large Enterprises speak of the positive impact of using nodejs, majorly through increased developer productivity and satisfaction.

<li>
<strong>Less Time to Market.</strong>
</li>

<a href="https://npmjs.com">Npm</a> hosts over 1,000,000 open source packages you can freely use.
With the large number of  ready to use libraries, development time is greatly reduced.

<h3 id="where-nodejs-shines">Where Nodejs shines</h3>

<li>
<strong>Node js is a great solution for handling high traffic websites.</strong> <small>(<em>source: <a href="https://nodejs.dev/learn/introduction-to-nodejs">nodejs</a></em>)</small>
</li>

NodeJs is the best way to handle websites with high traffic without sacrificing performance or accuracy.

<li><strong>Single Programming Language for front-end and back-end</strong></li>

With front-end applications developed with JavaScript, you don’t need to pick up a different language when using Node.js for the backend.

<li>
<strong>Total control over memory usage and scaling capabilities.</strong>
</li>

NodeJs doesn’t use any sort of virtual machine. This means that <strong>NodeJs doesn’t have to utilize any memory for processes</strong> giving developers the freedom to use as much of a system’s resources without worrying about consuming RAM.
Also NodeJs doesn’t allocate resources for itself, leaving developers with total control over what resources their applications use.

<li>
<strong>Building real-time applications.</strong>
</li>

When you <strong>post on twitter</strong> or <strong>place an order on Amazon</strong> or <strong>send a WhatsApp message</strong>, that is a <strong>real-time application</strong>. NodeJs graces at creating real-time applications without requiring additional plugins or libraries.

<li>
<strong>NodeJs is great for Internet of Things.</strong>
</li>
<p>
IoT (Internet of Things) are electronic objects; with sensors, processing ability, software, and other technologies that connect and exchange data with other devices and systems over the Internet.
</p>
<p>
IoT may consist of thousands of such devices, that sent data/requests rapidly to the servers. NodeJs can handle multiple requests deftly without sacrificing performance.
</p>

<li>
<strong>NodeJs is great for creating real-time chat servers.</strong>
</li>
<p>
NodeJs makes it easy to use WebSockets, which provide <strong>low latency</strong>, <strong>full-duplex</strong> communications channels over a single TCP connection.
</p>

<li>
<strong>Building streaming apps.</strong>
</li>
<p>
The backend tech is the support system for an efficient front-end performance.
</p>
<p>
With streaming, certain parts of the application needed for bootstrapping are downloaded. The remainder can be downloaded in the background if necessary. When the application is completely downloaded, it can function without any network connection at all.
</p>
<p>
NodeJs is an excellent player in the development of streaming applications having a native Stream API.
</p>

<li>
<strong>NodeJs offers Easy Scalability.</strong>
</li>

<p>
NodeJs scales better than most other typical platforms because of it's event-based model.
</p>

<p>
To explain how NodeJs scales: <em>A NodeJs application will start and wait for requests. For each request to the db, NodeJs will fire that request, and then go back to sleep while it waits for results or if there are other tasks, it will go on and process them and <b>only when the DB comes back</b>, it will restore the original request. With increased requests, there is less overhead to handle requests since it avoids spinning up threads for each request.</em>
</p>

<p>
So in typical use case, an average developer will make <strong>more scalable server with Node.js</strong>, simply because Node.js doesn't do anything at all 95% of the time.
</p>

<li><strong>NodeJs is <em>unopinionated</em></strong></li>
<p>
<strong>Unopinionated</strong> means there is no right way to do things. By contrast <strong>opinionated</strong> means you are guided/forced into a specific way to do something.
NodeJs Gives you freedom to start building everything from scratch.
</p>

<li><strong>You are not stuck with backend development</strong></li>
<p>
You’re not constrained to building back-end applications when you’re using Node.js. It can be coupled with frameworks like Electron and NW.js, which enable you to build cross-platform Desktop applications.
</p>

<li><strong>Seamless JSON support</strong></li>
<p>NodeJs is very fast in parsing through and manipulating JSON retrieved from external web API sources like MongoDB, reducing time needed per request. Apache modules, like PHP, may need more time, because they cannot efficiently parse and manipulate JSON because they need <a href="http://en.wikipedia.org/wiki/Marshalling_%28computer_science%29">marshalling</a> to process the data.
</p>
</ol>


## Summary
Node.js has opened up endless possibilities for server-side development using Javascript. The **flexibility and rich ecosystem** of the Node.js environment means that it will _continue to thrive and attract more developers in the near future_.

Do consider building with Node.js if you prioritize **performance and scalability** for your applications.

Did I leave something out? Drop it in the comments.

_Thanks for reading. Connect with me on [twitter](https://twitter.com/smitterhane) Peace✌️._