Scaling Netflix’s WebSocket proxy to billions of connection
Tags: System Design, Distributed Computing, Scale
In September 2024, Netflix published an article titled “Pushy to the Limit: Evolving Netflix’s WebSocket Proxy for the Future,” detailing the advancements of their WebSocket server, Pushy.
Pushy maintains persistent WebSocket connections with devices running the Netflix application, enabling efficient, on-demand data delivery without constant polling.
Key Highlights:
Initial Use Cases: Pushy was developed to support voice control features, allowing users to interact with Netflix via virtual assistants like Amazon’s Alexa. It also integrated with the Rapid Event Notification System (RENO) to provide real-time UI updates, reducing backend requests and device resource consumption.
Expansion and Reach: Originally deployed on platforms such as Fire TVs, PS4s, Samsung TVs, and LG TVs, Pushy now supports nearly a billion devices, including mobile applications and web browsers. This expansion includes older devices lacking modern capabilities, achieved by implementing custom encryption layers for secure communication.
Scalability Enhancements: Over five years, Pushy scaled from tens of millions to hundreds of millions of concurrent connections, regularly handling up to 300,000 messages per second. This growth prompted a reevaluation of its design to ensure future stability and performance.
Netflix’s Pushy WebSocket Proxy is a highly scalable, persistent connection system designed for real-time communication across nearly a billion devices. Compared to other large-scale WebSocket deployments, Pushy stands out in the following ways:
How Pushy Compares to Other WebSocket Deployments:
1. Scale & Reach
Pushy: Supports hundreds of millions of concurrent connections, handling up to 300,000 messages per second. Initially built for voice control and real-time UI updates, it has expanded to support Netflix across TVs, mobile, and web.
WhatsApp / Facebook Messenger / Slack: Also rely on WebSocket-based architectures for real-time messaging. WhatsApp, for instance, serves over 2 billion users globally, but its WebSocket connections are optimized for text, voice, and media delivery rather than device control.
Stock Market & Financial Platforms (e.g., Bloomberg, Robinhood): Use WebSockets for low-latency market data streaming, but the connection volumes are much lower than those of consumer applications like Netflix or WhatsApp.
2. Optimization for Device Constraints
Pushy: Designed to run on a wide variety of devices, including older smart TVs and mobile platforms, where persistent WebSocket support is not natively available. It uses custom encryption to ensure security on legacy devices.
Google Firebase Realtime Database: Uses WebSockets for real-time app updates, but primarily on mobile and web, without the same level of embedded device support.
Slack & Discord: Optimize for text, voice, and video streaming but typically operate within modern app ecosystems, avoiding the challenges of older hardware.
3. Connection Persistence & Reliability
Pushy: Designed to maintain a persistent connection even on constrained network environments (e.g., low-power IoT-style devices like TVs). It ensures high reliability and can gracefully handle network transitions (e.g., Wi-Fi to mobile data).
Zoom & Microsoft Teams: Use WebSockets and WebRTC for real-time communication, but their primary focus is high-bandwidth video and voice streaming, rather than maintaining lightweight, persistent WebSocket connections across devices.
Gaming Platforms (e.g., Xbox Live, PlayStation Network): Also use WebSockets but primarily for multiplayer session management, not for streaming UI updates and notifications at Netflix’s scale.
Final Thoughts
Netflix’s Pushy is unique among WebSocket deployments because it:
✔ Operates across a billion devices, including legacy hardware.
✔ Optimizes for persistent, low-power, real-time updates rather than high-bandwidth data streams.
✔ Handles hundreds of millions of concurrent connections, making it one of the most massive consumer WebSocket implementations today.
While other platforms like WhatsApp, Slack, and financial services use WebSockets for real-time messaging and streaming, Pushy’s scale, device diversity, and optimization for the streaming ecosystem set it apart from most other large-scale deployments. 🚀