Why node js? That is a question that is beginning to be answered, especially by large organizations that use this tool and that have achieved success in their products. The node js companies.
Node.js came as a scalability solution for servers with very high traffic. With other technologies such as Java or PHP, each connection to the server generates a new thread that is allocated approximately 2 MB of memory. If we refer to an 8 GB RAM system, it would give us a maximum number of 4’000 users only. As the customer base of a business or company grows, it will need to support an increasing number of simultaneous connections, to which more and more servers will need to be added, not to mention that the situation could arise in which a user use more than one connection.
Thus, the servers presented a bottleneck depending on the number of connections they were capable of supporting.
Node solves this problem by changing the way a connection is made to the server. Instead of spawning a new thread for each connection and allocating the 2MB of memory to it, each connection only triggers one event execution, furthermore, Node also claims that it will never stall and that its system can support tens of thousands. of connections.
That then is a technical explanation of why, but now we can talk about those greats who benefited from what this tool offers.
Uber.
The ride-sharing platform Uber, present in 68 countries on six continents, is one of the best examples of Node.js apps. Uber has doubled in size every 6 months in the last two years. This is where Node.js comes in because it is ideal for distributed systems that carry out many network requests in order to quickly process large amounts of information
Netflix
The streaming TV giant chose Node.js for three reasons: the ease with which JS developers learn it, the fact that it eliminated the need to write code twice, and the high performance. Also with Node.js they decreased compilation times and enabled user customization. As a result, the Netflix team has improved the loading speed of the app by 70%.
Pot
NASA uses spacesuits with Node. After experiencing a hair-raising systems failure during a spacewalk, the team began looking into Node.js as a way to unify data from spacesuit systems.
PayPal
The company started out with a Node.js prototyping platform, and once it proved its efficiency, it was integrated, moving all of its web applications from Java to JavaScript and Node.js.
One of the most important factors for the decision was the possibility of breaking down the language barrier between engineering: the use of the same language on the server and on the client side improved internal communication and understanding of the product as a whole. According to the company, its Node.js application reduces files by 40% and code by 33%. Thus, response time was improved by 35%, resulting in pages loading 200 ms faster.
It is clear that, given these examples of the giants that use it, Node is also a giant, it is the best option on the market for real-time applications, such as online chats or video games. Learning to use it is not difficult if you already have JavaScript knowledge.