From Java to Node: the Netflix story

2016-07-06 09:30:16 admin Companies 0 Comments

The Why

Before node Netflix had a work style and process that was very difficult both for the company and the development teams. They were working on large applications with huge startup times and slow builds.  They had Java on the server, Javascript on the client, so developers had to be great in two very different languages, they had to be really great at different aspects. There was a lot of doing things twice, they had to write everything twice, two ways for data access, rendering, debugging etc.

The pace of the company was slowing down because of all these issues, and the innovation needed to maintain the company competitive and in the spotlight was bogged down.

To simplify everything, and to be able to move the site to a single page application where they could render each page fully, they moved to Node.js. There were several reasons why Netflix chose Node.js.The first and most important one was to have a common language, one that could help them write the same code and run it everywhere and not have developers constant shifting from Java to Javascript. A universal language server and client side was just what they needed to be able to build that single page app, and not worry so much about getting great Java developers and be able to focus more on building a great product experience. Java was on the losing side both in Netflix's case and in the PayPal story - check it out here.

Another aspect of this transition was the performance that Node.js offered. From a 40 minute + startup time they went to under a minute. That’s not just an improvement, that’s a whole other level of performance. Also, Node has a lot of modules that are mostly open source, can be used quickly and help you get better tracking, quite different from Java where you don’t have all these helping hands.

These were the basic reasons why Netflix turned to Node.js from Java.

The Experience

The first thing that happened was that the team as a whole had to change not just their language ,but also the way mental processes they usually applied. They had to learn the intricacies of Node.js and focus more on that. Also, even though one of the benefits was and is universality, they had to be careful on how they wrote the code, server and client side, they had to take advantage of this upsight and at the same time think really hard about how the written code will be used and how will it scale. They were a bit excited that they would be able to use just one language for both sides, and it will make things so much easier and it did to a degree, but they had to approach things differently on the server and on the client.

Moving to a new architecture they also had get a lot of insights, a topic they had no data on as it was a new technology for them. They had a lot of learning as you go, in different aspects.

The Future

Right now Node.js is used in production for the entire website, but their mobile application runs on other languages as well. As of December 2015 there was a 30 + Node Stack team at Netflix, which is great. They also have planned a container based strategy built on node, which gives them a lot of flexibility, and scale. Together with Node they also used various other technologies like:  Titus, Reactive Socket, Qiro, Docker, Prana etc. One thing is certain for the present and the future, Node.js  is a big part of Netflix, a place where developers can grow and where node innovation can happen.

Leave a comment


0 Comments

Subscribe to our newsletter!

Make sure you never miss the interesting stories of Node.js startups, apps and projects.