Shifting its user interfaces to Node.js, Netflix has been able to streamline the development, cut the build times, and increase the level of customization of its UIs for each user.
Node was “a really attractive option for us, because it aligned well with the skills of the UI engineers, said Kim Trott, director of user interface engineering at Netflix. Trott will be speaking at the Netflix’s use of Node at NodeSummit Interactive next week in Portland, Oregon.
Traditionally, Netflix has been an enterprise Java shop, but “as we migrated out of the data center to the cloud we moved to a more service-based architecture,” Trott said. The company is in the process of breaking up what used to be a monolithic Java application into a set of smaller services. Java still powers the backend of Netflix, but all the stuff that the user sees comes from Node.
Node also improves the build times considerably. The Java application could take as long as 40 minutes to start up, which doesn’t exactly lend itself to a speedy DevOps process. “The team was not able to move as quickly as they wanted to,” she said.
The Future of Netflix and Node
In the future, Netflix will also be migrating to Node for its data access layer, in addition to the user interfaces. Netflix layers its client to write scripts against one API rather than writing to hundreds of services. When deploying scripts in the API service layer, clients draw from an aggregation of data layers, such as subscriber information, metadata about movies, subtitle information, and more. Currently, API scripts are deployed directly onto a single API service, which limits the ability to scale or isolate issues which arise.
As such, Netflix is currently developing a way to write scripts as individual Node applications. If a script performs badly, it will then only hamper or kill its own service, rather than the entire system. These Node applications will be running on Docker containers alongside Amazon Web Service’s Elastic Container Service (ECS), Netflix’s infrastructure provider of choice. This allows for containers to be run locally and debugged locally, rather than debugging their monolithic API server locally.
Node has proven so handy, that the company is expanding its use to other layers of the stack, Trott said.
Netflix is taking its use of Node a step further with Codex, which is a set of capabilities to deliver specific features to specific customers, depending on customer settings of what devices are being used.
Netflix plans to release Codex next year as an open source project, Trott said.
The New Stack is a wholly owned subsidiary of Insight Partners, an investor in the following companies mentioned in this article: Docker.