推动到极限:为未来发展的Netflix WebSocket代理进行改进

By Karthik Yagna, Baskar Odayarkoil, and Alex Ellis

作者:Karthik Yagna,Baskar OdayarkoilAlex Ellis

Pushy is Netflix’s WebSocket server that maintains persistent WebSocket connections with devices running the Netflix application. This allows data to be sent to the device from backend services on demand, without the need for continually polling requests from the device. Over the last few years, Pushy has seen tremendous growth, evolving from its role as a best-effort message delivery service to be an integral part of the Netflix ecosystem. This post describes how we’ve grown and scaled Pushy to meet its new and future needs, as it handles hundreds of millions of concurrent WebSocket connections, delivers hundreds of thousands of messages per second, and maintains a steady 99.999% message delivery reliability rate.

Pushy是Netflix的WebSocket服务器,与运行Netflix应用程序的设备保持持久的WebSocket连接。这使得数据可以按需从后端服务发送到设备,而无需不断轮询设备的请求。在过去几年中,Pushy经历了巨大的增长,从一个尽力而为的消息传递服务演变为Netflix生态系统的重要组成部分。本文描述了我们如何扩展和扩展Pushy以满足其新的和未来的需求,因为它处理数亿个并发WebSocket连接,每秒传递数十万条消息,并保持稳定的99.999%的消息传递可靠性。

History & motivation

历史和动机

There were two main motivating use cases that drove Pushy’s initial development and usage. The first was voice control, where you can play a title or search using your virtual assistant with a voice command like “Show me Stranger Things on Netflix.” (See How to use voice controls with Netflix if you want to do this yourself!).

有两个主要的激励用例推动了Pushy的初始开发和使用。第一个是语音控制,您可以使用语音命令(例如“在Netflix上给我看《怪奇物语》”)通过虚拟助手播放标题或搜索。 (如果您想自己尝试,请参阅如何使用Netflix的语音控制!)

If we consider the Alexa use case, we can see how this partnership with Amazon enabled this to work. Once they receive the voice command, we allow them to make an authenticated call through apiproxy, our streaming edge proxy, to our internal voice service. This call includes metadata, such as the user’s information and details about the command, such as the specific show to play. The voice service then constructs a message for the device and places it on the message queue, which is then processed and sent to P...

开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-22 12:07
浙ICP备14020137号-1 $访客地图$