Node.js: the JavaScript platform used by Netflix and Uber

The progressive and noticeable growth of JavaScript is hard to ignore. Over the years, this programming language has singlehandedly provided hundreds – if not thousands – of frameworks and libraries, helping developers and companies to create websites, portals, and interactive and agile applications, with modern interfaces. Adding the fact that JavaScript is completely independent from other platforms, easy to learn and supported by an ever-growing community, among many other advantages, it is easy to understand why.

However, for a long time, JavaScript was a language exclusively oriented towards client-side development and never managed to establish itself for backend purposes – at least until 2009, when the first version of Node.js was launched. For the first time in history, JavaScript became a viable alternative for backend solutions.

It is important to demystify the fear that many companies have about this alternative to more traditional backend solutions (Java, .NET, etc.) in the world of Enterprise applications, even though companies including Netflix, Trello, PayPal, LinkedIn, Uber, Walmart, NASA, Intel and Twitter have already successfully implemented Node.js in their infrastructures – and this list continues to grow each day.

For those who are not familiar with Node.js, it is important to highlight some of its biggest advantages:

  • Ideal for the construction of real-time applications;
  • Facilitates the programmer’s full stack vision in JavaScript (as both backend and frontend languages are the same);
  • Decreases development time, thanks to its full stack view;
  • Supported by a gigantic community that contributes new libraries and updates at an astonishing rate;
  • Extremely fast code execution;
  • Ideal in architectures oriented towards micro services.

We can now go back to what we really want to discuss: why should companies adopt Node.js for their applications? In a nutshell, because it was designed for large-scale applications, offering a modern perspective on how to develop applications with complex architectures.

How those capacities actually come to fruition is the most important aspect.

Scalability is essential for the vast majority of current corporate applications, and Node.js responds to that necessity by offering a base clustering module with load balancing on multiple CPU cores. Associating the clustering power with a single-threaded, non-blocking solution, specifically designed for events and callbacks, allows it to handle multiple connections simultaneously, processing millions of concurrent connections.

Being single-threaded is often regarded as a limitation because, theoretically, it can slow down the performance of the application, but that is nothing more than a myth. On solutions that are not oriented towards events, where multiple threads are necessary to deal with multiple requests, the number of parallel threads is limited. Node.js is completely free from these limitations. As long as there’s available memory and if the kernel allows it, we can effortlessly process any number of simultaneous requests.

Companies are also generally afraid to place their code in the Cloud, which would prevent the usage of the NPM (Node Package Manager). In order to address this issue, we have created a new Enterprise version that can be installed and maintained on companies’ own infrastructures, therefore preserving their internal module registry and complying with the strictest security requirements.

We also need to touch on the subject of long-term support. This will always be a priority for Enterprise solutions, but the truth is that Node.js also assures that very same support.

Each major version of Node.js will include active support for 18 months from the period it becomes eligible for LTS (Long Time Support), after which it will transition to a maintenance regime with a duration of 12 additional months. During this period, the version used will receive security updates and bug fixes, but new functionalities will not be added. In this way, we have addressed the potential problem that causes the absence of support for solutions developed with the help of Node.js, due to its lack of longevity.

Based on all this information, the aforementioned companies decided to make their transition to this technology. What have they accomplished?

  • Netflix: a reduction of over one minute on buffering times.
  • LinkedIn: rebuilt the core of their mobile services with Node.js. Their application is currently running 20 times faster and benefits from a substantially better integration between backend and frontend. This was achieved while Node.js was just in its first year of development.
  • PayPal: migrated all their web applications from Java to JavaScript and Node.js and saw their programmers writing 33% less lines of code, using more than 40% less files and reducing by half the necessary time to build their applications (while also requiring less people). Response times have decreased by roughly 35%, which translates to an improvement of 200 ms in page creation times.
  • Uber: built their interpersonal system between drivers and passengers with Node.js, due to its fast response capabilities and massive power to process requests, along with the welcome ease and ability to have a distributed architecture.

I don’t want to plant the idea that Node.js is a “silver bullet”. It might not be the best solution for all cases, but it is always wise to evaluate your possibilities and understand the potential benefits of this technology.

Francisco Costa

Enterprise Solutions Lead

Francisco CostaNode.js: the JavaScript platform used by Netflix and Uber

Read more in

Custom Development

Readers also checked out

Do you want to receive amazing news about the IT industry's hot topics and the best articles about state-of-the-art technology?
Subscribe to our newsletter and be the first one to receive information to keep you constantly on edge.