Netflix has around 2800 Java applications & around 1500 internal libraries.
Netflix is primarily a Java-based company. Uses Java for its backend across its various applications.
Including
- internal tools
- film production software
- streaming.
Over the years, they have continuously evolved their Java usage to meet the demands of their large-scale video streaming platform.
They previously used custom frameworks and legacy Java EE libraries.
How Java has evolved at Netflix:
Netflix's journey to adopt different technologies shows their quest for efficient, scalable solutions.
It all started nearly seven years ago when Netflix started using Groovy in a microservices setup, where each service handled specific tasks and data.
They used Groovy scripts and a backend-for-frontend system for better data retrieval and integrated RxJava and Hystrix for fault tolerance and concurrent operations.
However, managing scripts and reactive programming was difficult, leading to data fetching problems with their REST APIs.
So, Netflix switched to GraphQL Federation, combining microservices into Domain Graph Services (DGSs) with a unified GraphQL schema.
This change streamlined data fetching, removed the need for separate backends, and reduced reliance on RxJava and Hystrix.
GraphQL’s schema-based querying provided accurate data tailored to UI needs, making development more efficient.
🔹Java at Netflix
Netflix relies heavily on Java to support diverse functions, with 2800 microservices and 1500 internal libraries.
Their Java setup includes the Azul Zulu JVM, an OpenJDK build. They use Gradle with Nebula plugins for version control and dependency management, and IntelliJ with custom plugins for development workflows.
The transition from Java 8 to Java 17 marked a significant milestone for the company. Before, they were stuck on Java 8, even though Java 11 and 17 were available. The delay was due to older microservices running on a custom stack with outdated libraries.
When they finally upgraded to Java 17, they saw a 20% improvement in CPU usage with the G1 garbage collector on Java 17.
For their proxy, Zuul, they use the Shenandoah garbage collector because of its low pause times.
They have begun testing Java 21 as well, as it is already out. Moving to Java 21 from Java 17 is easy and brings exciting features. Virtual threads offer better scalability, and the enhanced ZGC garbage collector works for more use cases. Java 21 also introduces data-oriented programming with new language features, making Java even more powerful.
🔹Spring Boot 3
Netflix has successfully migrated from its legacy Java stack to Spring Boot.
It was challenging, but it unified their development process. All new applications are developed using Spring Boot, and Netflix has developed Spring Boot Netflix, which incorporates gRPC, Spring Security, and observability features.
The switch also enabled the transition from Java 8 to Java 17, with plans for Java 21 .
From in-house frameworks to modern microservices using RxJava and GraphQL Federation, Netflix's Java stack has improved scalability and efficiency with each adaptation.
---
That's all for now!
If you're finding value in this post, like and share it with your audience. Don't miss out on more insightful content — follow me
@umar482