Scaling Push Messaging for Millions of Netflix Devices
Netflix built Zuul Push, a massively scalable push messaging service that handles millions of always-on, persistent connections to proactively push time-sensitive data, like personalized movie recommendations, from the AWS Cloud to devices. This helped reduce Netflix’s notification latency and the Amazon EC2 footprint by eliminating wasteful polling requests. It also powers Netflix’s integration with Amazon Alexa.
Zuul push is a high-performance async WebSocket/SSE server. This session covers its design and how it delivers push notifications globally across AWS Regions. Key takeaways include how to scale to large numbers of persistent connections, differences between operating this type of service versus traditional request/response-style stateless services, and how to push messaging can add new, exciting features to your application.
Netflix Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more. It is a JVM-based router and server-side load balancer used to control and manage traffic flow between clients and services.
Zuul can be used to:
- Route requests to different services based on various criteria, such as the client’s IP address, the request’s URL, or the current load on the services.
- Filter requests before they are routed to the services, such as to authenticate users or to add headers to the demands.
- Monitor the health of the services and route requests to healthy services only.
- Implement fault tolerance by retrying failed requests and routing requests to backup services if the primary services are unavailable.
- Secure the API by implementing authentication and authorization.
Zuul is a popular choice for microservices architectures because it provides several features essential for managing traffic flow between microservices. It is also easy to configure and use, and it is well-documented.
Here are some of the benefits of using Netflix Zuul:
- Dynamic routing: Zuul can be used to route requests to different services based on a variety of criteria, such as the client’s IP address, the request’s URL, or the current load on the services. This can help to improve the performance and scalability of your microservices architecture.
- Monitoring: Zuul can monitor the health of the services and route requests to healthy services only. This can help to improve the availability of your microservices architecture.
- Fault tolerance: Zuul can implement fault tolerance by retrying requests that fail and by routing requests to backup services if the primary services are unavailable. This can help to improve the reliability of your microservices architecture.
- Security: Zuul can be used to secure the API by implementing authentication and authorization. This can help to protect your data from unauthorized access.
Overall, Netflix Zuul is a powerful tool that can be used to manage traffic flow between microservices. It is easy to configure and use, and it is well-documented. If you use a microservices architecture, then Netflix Zuul is an excellent option.