@ezbackend: How Netflix Really Uses Java? API Gateway Netflix follows a microservices architecture. Every piece of functionality and data is owned by a microservice built using Java (initially version 8) This means that rendering one screen (such as the List of List of Movies or LOLOMO) involved fetching data from 10s of microservices. But making all these calls from the client created a performance problem. Netflix initially used the API Gateway pattern using Zuul to handle the orchestration. BFFs with Groovy & RxJava Using a single gateway for multiple clients was a problem for Netflix because each client (such as TV, mobile apps, or web browser) had subtle differences. To handle this, Netflix used the Backend-for-Frontend (BFF) pattern. Zuul was moved to the role of a proxy In this pattern, every frontend or UI gets its own mini backend that performs the request fanout and orchestration for multiple services. The BFFs were built using Groovy scripts and the service fanout was done using RxJava for thread management. GraphQL Federation The Groovy and RxJava approach required more work from the UI developers in creating the Groovy scripts. Also, reactive programming is generally hard. Recently, Netflix moved to GraphQL Federation. With GraphQL, a client can specify exactly what set of fields it needs, thereby solving the problem of overfetching and underfetching with REST APIs. The GraphQL Federation takes care of calling the necessary microservices to fetch the data. These microservices are called Domain Graph Service (DGS) and are built using Java 17, Spring Boot 3, and Spring Boot Netflix OSS packages. The move from Java 8 to Java 17 resulted in 20% CPU gains. More recently, Netflix has started to migrate to Java 21 to take advantage of features like virtual threads. #backend #softwareengineer #softwareengineering #programming #architecturedesign #systemdesign #microservicesarchitecture #distributedsystems #systemdesignbook #microservices #netflix
EZ Backend
Region: VN
Friday 19 April 2024 09:22:38 GMT
Music
Download
Comments
There are no more comments for this video.
To see more videos from user @ezbackend, please go to the Tikwm
homepage.