Why did Netflix move to Node.js?
Netflix switched its APIs for the different platforms (Mobile, TV, Laptops etc.) from Groovy scripts, running as a single monolith, to Node.js + restify instances, running in separate Docker containers. That way they run faster and scale better, versioning is easier, and the development speed has vastly improved. The main backend and all the heavy lifting are still done in Java, though.
The main backend and all the heavy lifting at Netflix are still done in Java. But as far as we know, each platform – TV, iOS, Android, Windows, Browsers – used to be handled by a single monolith application with multiple Groovy scripts. It has changed and now, they have separate APIs written in Node.js + restify in separate Docker containers. This happened because of Node’s best features: performance, scalability, and development speed. Also, Netflix is not the only one to have rebuilt itself with Node recently. Let me go through the main upsides of Node.js briefly below.
Node.js uses the so-called event loop and a non-blocking, asynchronous I/O, which allows it to handle tens of thousands of requests per second, with very low latency, in a highly cost-effective manner (which is crucial for Netflix, which can take up to 15% of world’s broadband by itself). It is also run by the V8 engine, which is written in C++ (which is where the speed comes from). You can read more about Node’s performance here.
Netflix is running Node.js instances on AWS in Docker containers – the stack that has been synonymous with scalability for a while now. This allows for the horizontal scaling (more,= smaller instances instead of one bigger instance), independent, non-breaking changes to the containerized APIs (one buggy container doesn’t affect the others) and easy version control (which company has 1000s of at the same time). Because of that, as you can guess, Netflix is currently one of the main AWS customers, which has been beneficial to both companies. You can read more about Node’s scalability over here.
Hope that you’re satisfied with the answer! For further reading on Node.js’s advantages and its usage at Netflix, just go through the links provided all over this answer.
In this post, I will show you how to use Express.js, Node.js and MongoDB.js. We will be creating a very simple Node application, that will allow users to input data that they want to store in a MongoDB database. It will also show all items that have been entered into the database.
Node.js for Beginners - Learn Node.js from Scratch (Step by Step) - Learn the basics of Node.js. This Node.js tutorial will guide you step by step so that you will learn basics and theory of every part. Learn to use Node.js like a professional. You’ll learn: Basic Of Node, Modules, NPM In Node, Event, Email, Uploading File, Advance Of Node.