netflix 工作原理_Netflix如何在屏幕后面工作?
netflix 工作原理
Netflix has reported to have over 182 million subscribers worldwide in the first quarter of 2020 (Of course, these numbers don’t include freeloaders like me, who’s family or friends have been generous enough to share their account and password). It shouldn’t be surprising that 16 million of these subscribers have joined in the first three months of this year as compared to 5 million new subscribers per quarter earlier.
據(jù)Netflix報道,到2020年第一季度,全球訂戶超過1.82億(當(dāng)然,這些數(shù)字不包括像我這樣的免費載客,他們的家人或朋友足夠慷慨地分享他們的帳戶和密碼)。 不足為奇的是,今年前三個月有1600萬訂戶加入,而之前每個季度有500萬新訂戶。
The current crisis has impacted many aspects of the entertainment industry, including some of Netflix’s, like its production house. However, Netflix has largely benefited as it doesn’t stream sports events, doesn’t have advertisement on the platform, doesn’t need movie theaters. Well, mostly.
當(dāng)前的危機(jī)已影響到娛樂業(yè)的許多方面,包括Netflix的某些方面,例如其制作公司。 但是,Netflix受益匪淺,因為它不播放體育賽事,在平臺上沒有廣告,不需要電影院。 好吧,主要是。
To prepare for job interviews, I recently started teaching myself about system design and architecture. While doing so I got a chance to learn the fascinating design model of Netflix. Its architecture is so intriguing that I believe it would fascinate the people outside the tech community as well. This article attempts at describing some of Netflix’s most riveting pieces of working in layman terms. I think even fairly experienced techies might get something out of it, especially if cloud architecture and system design is your discipline.
為了準(zhǔn)備工作面試,我最近開始自學(xué)系統(tǒng)設(shè)計和體系結(jié)構(gòu)。 在這樣做的同時,我有機(jī)會學(xué)習(xí)了Netflix的迷人設(shè)計模型。 它的架構(gòu)非常吸引人,我相信它也會吸引技術(shù)界以外的人們。 本文試圖以非專業(yè)人士的方式描述Netflix最吸引人的作品。 我認(rèn)為,即使是經(jīng)驗豐富的技術(shù)人員也可以從中受益匪淺,尤其是如果云架構(gòu)和系統(tǒng)設(shè)計是您的專業(yè)。
I have consolidated this article from various sources and tried my best to collect the updated and correct information. As quoted by Todd Hoff , “Facts on the ground change over time and depend on who is telling the story and what audience they’re addressing ”. So, if you find any mistakes or inaccuracies, kindly bring them to my notice.
我已經(jīng)從各種來源整理了這篇文章,并盡力收集了更新的正確信息。 正如托德·霍夫(Todd Hoff)所引用的那樣,“事實隨著時間的流逝而變化,取決于誰在講故事以及他們要針對的受眾是誰”。 因此,如果您發(fā)現(xiàn)任何錯誤或不正確之處,請及時通知我。
Before getting into the nuts and bolts of the architecture, let’s look at some of the most interesting user experience enhancements which Netflix has integrated into its system.
在深入了解該體系結(jié)構(gòu)之前,讓我們看一下Netflix已集成到其系統(tǒng)中的一些最有趣的用戶體驗增強(qiáng)功能。
推薦系統(tǒng) (The Recommendation System)
Netflix Recommendation Algorithm has been quite popular with the people studying data analytics. Netflix has a humongous collection of user data and is still collecting more with every new user and user activity.
Netflix推薦算法在研究數(shù)據(jù)分析的人們中非常受歡迎。 Netflix擁有龐大的用戶數(shù)據(jù)收集,并且在每個新用戶和用戶活動中仍在收集更多數(shù)據(jù)。
blog.re-work.co)blog.re-work.co )It accounts numerous metrics from this dataset to build the algorithm, some of which are:
它考慮了來自該數(shù)據(jù)集的大量指標(biāo)以構(gòu)建算法,其中一些指標(biāo)是:
Your viewing history and ratings are the ones you must have guessed already. Netflix can make great suggestions based on the type of movies you watch and how you rate the movies you have watched. You must have noticed Netflix doesn’t use IMDb ratings (or any other world average rating) to suggest you any movies. Instead it believes that each user is different and would not necessarily agree with the world’s average opinion about the show. Hence it focuses on an individual’s watch history with other factors and finds a pattern about each user’s choice.
您的觀看歷史和收視率是您必須已經(jīng)猜到的。 Netflix可以根據(jù)您觀看的電影類型以及您對已觀看電影的評分方式提出出色的建議。 您一定已經(jīng)注意到Netflix沒有使用IMDb分級(或任何其他世界平均分級)來向您推薦任何電影。 相反,它認(rèn)為每個用戶都是不同的,不一定會同意世界各地對該節(jié)目的平均看法。 因此,它著重于個人的觀看歷史以及其他因素,并找到有關(guān)每個用戶選擇的模式。
Other viewers with similar tastes and choices. This algorithm is known as Collaborative Filtering (CF). It is based on the idea that if two clients have similar rating history they will behave similarly in the future. For example, if one of the two similar users rates a movie with a great score, it is more likely that the other user would like it as well and hence Netflix will recommend it to the other.
其他具有相似品味和選擇的觀眾。 該算法被稱為協(xié)作過濾(CF) 。 基于這樣的想法,即如果兩個客戶具有相似的評級歷史,則他們將來的行為將相似。 例如,如果兩個相似的用戶之一為電影評分很高,那么另一個用戶也很可能會喜歡它,因此Netflix會推薦給另一個人。
Titles, genres, actors, release year etc. This configures the Content Based Filtering (CB) algorithm. This algorithm recommends movies based on the kind you have liked before. The main difference from CF is that CB offers recommendations based not only on similarity by rating but is more about the information from the products. For example, recommending movies by the same actor you liked before. These factors with user profiling help in learning user preferences.
標(biāo)題,體裁,演員,發(fā)行年份等。這將配置基于內(nèi)容的過濾(CB)算法。 此算法根據(jù)您之前喜歡的電影類型推薦電影。 與CF的主要區(qū)別在于,CB不僅基于評級的相似性提供建議,而且還提供有關(guān)產(chǎn)品信息的更多信息。 例如,由您之前喜歡的同一位演員推薦電影。 用戶配置文件中的這些因素有助于學(xué)習(xí)用戶的偏好。
User profiling includes information like the time of the day when you watch, the device you watch it on, the duration you watch for etc. For example, if you show a pattern of not sitting at lengths, Netflix will try to find short movies or shows with small episode run-times for you.
用戶配置文件包括諸如觀看時間,觀看設(shè)備,觀看持續(xù)時間等信息。例如,如果顯示出坐著不動的樣子,Netflix將嘗試查找短片或會以較小的劇集運行時間顯示給您。
個性化藝術(shù)品 (Personalized Artworks)
Data analytics doesn’t just stop at the recommendation system. Netflix is highly data-driven and uses its analytics to appeal you to watch more. If you have ever logged in through different accounts, you may have noticed that Netflix doesn’t use the same header images for a show, for all the users.
數(shù)據(jù)分析不僅止于推薦系統(tǒng)。 Netflix是高度數(shù)據(jù)驅(qū)動的,并利用其分析吸引您觀看更多內(nèi)容。 如果您曾經(jīng)通過不同的帳戶登錄過,您可能會注意到,對于所有用戶,Netflix的節(jié)目都不使用相同的標(biāo)題圖像。
highscalability.squarespace.com)highscalability.squarespace.com )For example, here are different header images for Stranger Things. Each of us would see a different artwork decided by Netflix. Netflix considers various factors to choose the image that would best entice you to watch the show. It will also account for something basic like the number of clicks a certain image receives. The image with most clicks or popularity, then makes as one of the factors in the algorithm.
例如,這是陌生人事物的不同標(biāo)題圖像。 我們每個人都會看到Netflix決定的不同作品。 Netflix考慮各種因素來選擇最能吸引您觀看節(jié)目的圖像。 它還將說明一些基本信息,例如某張圖片獲得的點擊次數(shù)。 點擊次數(shù)或人氣最高的圖像成為算法中的因素之一。
highscalability.squarespace.com)highscalability.squarespace.com )Have a look at another example for the artwork of the movie, Good Will Hunting. Based on your preferences and viewing history, if Netflix predicts that you like comedies it will show you the image of Robin Williams for this movie. If you like romantic movies, Netflix will show you the image of Matt Damon and Minnie Driver, to tell you it has elements of romance as well.
看電影的另一個例子,Good Will Hunting。 根據(jù)您的喜好和觀看歷史記錄,如果Netflix預(yù)測您喜歡喜劇,它將為您顯示這部電影的Robin Williams形象。 如果您喜歡浪漫電影,則Netflix會向您顯示Matt Damon和Minnie Driver的圖像,以告訴您它也具有浪漫元素。
As you can see how important it is to select the right header image, as it sends a strong personal message of what the movie is about and would allure the user to watch it.
正如您所看到的,選擇正確的標(biāo)題圖像非常重要,因為它會發(fā)送強(qiáng)烈的關(guān)于電影內(nèi)容的個人信息,并會誘使用戶觀看電影。
Netflix高級架構(gòu) (Netflix High-Level Architecture)
The architecture can be divided into 3 major components:
該體系結(jié)構(gòu)可分為3個主要組件:
Client: Client is any Netflix application on the end user’s device. It could be a web browser on your laptop, an app on your phone, smart TV or gaming console. It is the interface which helps you browse and watch your favorite shows on Netflix.
客戶端:客戶端是最終用戶設(shè)備上的任何Netflix應(yīng)用程序。 它可能是筆記本電腦上的網(wǎng)絡(luò)瀏覽器,手機(jī)上的應(yīng)用程序,智能電視或游戲機(jī)。 它是幫助您瀏覽和觀看Netflix上喜歡的節(jié)目的界面。
Back-end: This is the section where everything happens before you hit play, on-boarding new content, processing videos, distributing them on servers located in different parts of the world and managing the network traffic.
后端:這是在您播放游戲,加載新內(nèi)??容,處理視頻,將它們分發(fā)到位于世界各地的服務(wù)器上以及管理網(wǎng)絡(luò)流量之前發(fā)生的所有事情的部分。
Almost all of these processes take place on Amazon Web Services (AWS). Netflix moved to AWS in a quest for a reliable infrastructure. AWS offers highly reliable databases, storage and redundant datacenters. This move to cloud services (AWS) came from the 3 days of downtime Netflix faced, in August 2008 due to corruption in their datacenters. Those datacenters were big, unreliable monliths and with the given growth at Netflix it needed much reliable and scalable microservices architecture . AWS along with addressing all these issues surprisingly turned out to be cheaper as well. As cloud came with elasticity, Netflix was required to pay only as per their use. While the datacenters Netflix had built were to be managed all the time and added costs even when most of them were not in use. And currently, Netflix runs on several thousands of AWS EC2 instances.
幾乎所有這些過程都在Amazon Web Services(AWS)上進(jìn)行。 Netflix轉(zhuǎn)向AWS以尋求可靠的基礎(chǔ)架構(gòu)。 AWS提供了高度可靠的數(shù)據(jù)庫,存儲和冗余數(shù)據(jù)中心。 遷移到云服務(wù)(AWS)的原因是,由于數(shù)據(jù)中心損壞,Netflix在2008年8月面臨三天的停機(jī)時間。 這些數(shù)據(jù)中心是巨大的,不可靠的整體,并且隨著Netflix的發(fā)展,它需要非??煽壳铱蓴U(kuò)展的微服務(wù)架構(gòu)。 令人驚訝的是,AWS以及解決所有這些問題的成本也降低了。 由于云具有彈性,因此Netflix只需要按照使用情況付費。 盡管Netflix建造的數(shù)據(jù)中心將始終受到管理,并且即使其中的大多數(shù)未使用,也會增加成本。 目前,Netflix可在數(shù)千個AWS EC2實例上運行。
CDN / OC: OC is Netflix’s own custom global CDN. To understand what OC is, let’s first take a quick look at CDNs.
CDN / OC: OC是Netflix自己的自定義全局CDN。 要了解什么是OC,首先讓我們快速看一下CDN。
內(nèi)容分發(fā)網(wǎng)絡(luò)/內(nèi)容分發(fā)網(wǎng)絡(luò)(CDN) (Content Delivery Network / Content Distribution Network (CDN))
CDN as defined by Wikipedia is a geographical distribution of proxy servers and data centers. The goal of CDN is to make the website faster. To be specific, it provides quick access to the internet content like videos, images, HTML pages etc. to help it load on the website faster.
維基百科定義的CDN是代理服務(wù)器和數(shù)據(jù)中心的地理分布。 CDN的目標(biāo)是使網(wǎng)站更快。 具體而言,它提供對視頻,圖像,HTML頁面等互聯(lián)網(wǎng)內(nèi)容的快速訪問,以幫助其更快地加載到網(wǎng)站上。
Before studying how it accomplishes the speed, let’s look at the challenge addressed by CDN. Imagine a situation where there are users around the world but a single server in NYC. If a user in Sydney makes a request to access a website hosted in NYC, it would be a 10,000 miles hike upwards to the server and 10,000 miles back to Sydney with the response and this round trip would take around 200 ms, while for a user making the same request from Dallas, it would be about 40 ms. As can be seen, the further one is from the server, the longer it will take for the content to load, in turn slowing down the website.
在研究它如何實現(xiàn)速度之前,讓我們看一下CDN所解決的挑戰(zhàn)。 想象一下這樣一種情況:在世界各地有用戶,但在紐約只有一臺服務(wù)器。 如果悉尼的用戶請求訪問位于紐約市的網(wǎng)站,則響應(yīng)將向上爬升10,000英里,服務(wù)器將返回10,000英里,返回悉尼將返回10,000英里,而這種往返行程將花費大約200毫秒,而對于用戶從達(dá)拉斯發(fā)出相同的請求大約需要40毫秒。 可以看出,離服務(wù)器越遠(yuǎn),內(nèi)容加載所需的時間就越長,從而降低了網(wǎng)站的速度。
This is where CDN comes into play, it places server endpoints across the globe thus enabling users to retrieve content from their closest geographical location, drastically reducing the amount of time. Hence resulting in high availability and performance by distributing services spatially to end users.
這就是CDN發(fā)揮作用的地方,它在全球范圍內(nèi)放置了服務(wù)器端點,從而使用戶能夠從其最近的地理位置檢索內(nèi)容,從而大大減少了時間。 因此,通過在空間上將服務(wù)分配給最終用戶,可以實現(xiàn)高可用性和高性能。
To summarize this with other benefits provided by CDN, it provides:
總結(jié)一下CDN提供的其他好處,它提供:
You must have guessed it by now, Netflix uses CDN to distribute its video content to serve its customers across the globe. We’ll see later, how OC is different from CDN and why Netflix needed it. Let’s talk about the first step in the Netflix’s model before getting into any other details which is, uploading a new movie on Netflix.
您現(xiàn)在一定已經(jīng)猜到了,Netflix使用CDN分發(fā)其視頻內(nèi)容來為全球客戶提供服務(wù)。 稍后我們將了解OC與CDN有何不同以及Netflix為什么需要它。 讓我們先談?wù)凬etflix模型的第一步,然后再探討其他細(xì)節(jié),即在Netflix上載新電影。
登上新內(nèi)容 (On boarding new Content)
Netflix receives new videos from the production houses and studios. These are high quality videos, which need to be processed before serving them to the viewers.
Netflix從制片廠和制片廠接收新視頻。 這些是高質(zhì)量的視頻,在將它們提供給觀眾之前需要對其進(jìn)行處理。
Netflix currently supports about 2200 devices including Android, iPhone, Apple TV, Kindle Fire, Playstation etc. and each of them requires a different video and audio format. With the help of hundreds of thousands of AWS servers Netflix converts the original video into a large number of different formats and resolutions to support different screen sizes and devices. This process is known as Transcoding. Netflix breaks the video into a number of chunks and AWS servers work in parallel to convert these chunks into different formats like mp4, 3gp etc. across different resolutions like 4k, 1080p and more. All these processed video copies are then stored on Amazon S3.
Netflix當(dāng)前支持大約2200臺設(shè)備,包括Android,iPhone,Apple TV,Kindle Fire,Playstation等,它們中的每一種都需要不同的視頻和音頻格式。 Netflix在成千上萬的AWS服務(wù)器的幫助下,將原始視頻轉(zhuǎn)換為多種不同的格式和分辨率,以支持不同的屏幕尺寸和設(shè)備。 此過程稱為代碼轉(zhuǎn)換 。 Netflix將視頻分為多個塊,AWS服務(wù)器并行工作,以將這些塊轉(zhuǎn)換為4k,1080p等不同分辨率的不同格式(例如mp4、3gp等)。 然后,所有這些已處理的視頻副本都存儲在Amazon S3中。
When a user requests to watch a video, Netflix analyzes the network quality and stability of the internet connection the user is on and then based on the device type and screen size provides with the right video format to stream. Have you ever noticed when watching a video it initially looks pixelated and snaps back to HD after a while? Netflix clients constantly keep a check on the health of the network and switch between formats when needed.
當(dāng)用戶請求觀看視頻時,Netflix會分析用戶所在的網(wǎng)絡(luò)質(zhì)量和互聯(lián)網(wǎng)連接的穩(wěn)定性,然后根據(jù)設(shè)備類型和屏幕尺寸提供正確的視頻格式進(jìn)行流式傳輸。 您是否曾經(jīng)在觀看視頻時注意到它最初看起來像是像素化并在一段時間后恢復(fù)為高清狀態(tài)? Netflix客戶端會不斷檢查網(wǎng)絡(luò)的運行狀況,并在需要時在格式之間進(jìn)行切換。
系統(tǒng)架構(gòu)與設(shè)計 (System Architecture and Design)
- Netflix is built on an architectural style that structures the application as a collection of services. This is known as microservices architecture. Microservices architecture’s core principle lies in decoupling all the services, which means that all services are designed to be independent of each other, for example, the video storage service would be decoupled from the service responsible for transcoding videos. Netflix建立在一種架構(gòu)風(fēng)格上,該架構(gòu)將應(yīng)用程序構(gòu)造為服務(wù)的集合。 這稱為微服務(wù)架構(gòu)。 微服務(wù)體系結(jié)構(gòu)的核心原理在于將所有服務(wù)分離,這意味著所有服務(wù)都設(shè)計為彼此獨立,例如,視頻存儲服務(wù)將與負(fù)責(zé)視頻轉(zhuǎn)碼的服務(wù)分離。
- This architecture is highly designed around business logic and allows flexibility in addressing individual needs of services. If you learn that the system is facing a bottleneck in storing videos, you can efficiently plan to scale up or optimize the storage logic without changing the resources configuration for other services. As opposed to this, in a Monolithic architecture, where all the components are interconnected, you would need to scale the whole system just to address the need of one service. This would significantly hike up the cost and hit the growth cap soon. 該體系結(jié)構(gòu)圍繞業(yè)務(wù)邏輯進(jìn)行了高度設(shè)計,并允許靈活地滿足服務(wù)的個性化需求。 如果您了解系統(tǒng)在存儲視頻方面面臨瓶頸,則可以有效地計劃擴(kuò)展或優(yōu)化存儲邏輯,而無需更改其他服務(wù)的資源配置。 與此相反,在所有組件都互連的整體式體系結(jié)構(gòu)中,您將需要擴(kuò)展整個系統(tǒng),以解決一項服務(wù)的需求。 這將大大增加成本并很快達(dá)到增長上限。
- Netflix, built on the microservices architecture and the distributed system of AWS, achieves reliable and scalable computing and storage with the help of AWS EC2 and S3. Cassandra and DynamoDb are the distributed databases used to store data like user profiles, billing information and other information like the movies that you have watched, which is then used in building the recommendations algorithm. Netflix建立在微服務(wù)架構(gòu)和AWS的分布式系統(tǒng)之上,借助AWS EC2和S3實現(xiàn)了可靠且可擴(kuò)展的計算和存儲。 Cassandra和DynamoDb是分布式數(shù)據(jù)庫,用于存儲諸如用戶個人資料,賬單信息以及其他信息(如您所觀看的電影)之類的數(shù)據(jù),然后用于構(gòu)建推薦算法。
需要自定義CDN,開放連接 (Need for Custom CDN, Open Connect)
Now you know that the idea of CDN is to put servers as close to the users as possible and optimize the network for speed and reliability. Why do you think Netlfix needed to build it’s own CDN?
現(xiàn)在您知道CDN的想法是使服務(wù)器盡可能靠近用戶,并優(yōu)化網(wǎng)絡(luò)的速度和可靠性。 您為什么認(rèn)為Netlfix需要構(gòu)建自己的CDN?
Netflix started off by using third-party CDNs which was the right option at that time. By not building it’s own CDN Netflix focused on other aspects of the system like developing algorithms for recommendation system, streaming high-quality videos and enhancing user experience.
Netflix開始使用第三方CDN,這在當(dāng)時是正確的選擇。 通過不構(gòu)建自己的CDN,Netflix專注于系統(tǒng)的其他方面,例如為推薦系統(tǒng)開發(fā)算法,流式傳輸高質(zhì)量視頻和增強(qiáng)用戶體驗。
Third party CDNs provided support to all types of content but Netflix was primarily concerned by just one, videos. Netflix at its scale, soon realized that by having a custom CDN with exclusive support for just large video streaming, it could create a high-performance network, notably enriching the user experience. And in 2011, Netflix created the same, Open Connect. The advantages offered by Open Connect were:
第三方CDN為所有類型的內(nèi)容提供了支持,但Netflix主要只關(guān)注一種視頻。 Netflix很快就意識到,通過擁有一個僅支持大型視頻流的定制CDN,它可以創(chuàng)建一個高性能網(wǎng)絡(luò),從而顯著豐富用戶體驗。 并在2011年,Netflix創(chuàng)建了相同的Open Connect。 Open Connect提供的優(yōu)勢是:
Less Expensive- Compared to third-party, in house CDN was a cheaper option for Netflix.
更便宜 -相比于第三方,在內(nèi)部CDN是Netflix的一個便宜的選擇。
Better Quality- Netflix now had end to end control from transcoding to client application, thus achieving better quality.
更高的質(zhì)量 -Netflix現(xiàn)在具有從轉(zhuǎn)碼到客戶端應(yīng)用程序的端到端控制,從而實現(xiàn)了更高的質(zhì)量。
More Scalable- With more control over the network, Netflix was closer to its goal of reaching everywhere in the world.
更具可擴(kuò)展性 -通過對網(wǎng)絡(luò)的更多控制,Netflix更加接近其遍及全球的目標(biāo)。
開放式連接設(shè)備 (Open Connect Appliances)
OCA is a fast server assembled from lots of hard disks and flash drives for storing videos. Hardware wise, there is nothing special about OCA, they’re based on commodity PC components and assembled in custom cases by various suppliers. You could buy the same computers if you want to.
OCA是由許多硬盤和閃存驅(qū)動器組裝而成的快速服務(wù)器,用于存儲視頻。 在硬件方面,OCA沒什么特別的,它們基于商用PC組件,并由各種供應(yīng)商定制組裝。 如果需要,您可以購買相同的計算機(jī)。
Open Connect Appliance開放式連接設(shè)備Netflix places these boxes with the datacenters of Internet Service Providers (ISPs) all over the world. ISPs are your internet provider. It’s who you get your internet service from, like Verizon, Hathway, Airtel etc.
Netflix將這些盒子放置在世界各地的Internet服務(wù)提供商(ISP)的數(shù)據(jù)中心中。 ISP是您的互聯(lián)網(wǎng)提供商。 是誰可以從Verizon,Hathway,Airtel等獲得互聯(lián)網(wǎng)服務(wù)的人。
ISPs are located all around the world close to their customers, which was the exact strategy Netflix was building its solution around. By using ISP datacenters to place OCAs with relevant videos, Netflix gets all the benefits of a datacenter but doesn’t need to manage it.
互聯(lián)網(wǎng)服務(wù)提供商(ISP)遍布全球,與客戶接近,這正是Netflix圍繞其構(gòu)建解決方案的確切策略。 通過使用ISP數(shù)據(jù)中心將OCA與相關(guān)視頻放置在一起,Netflix獲得了數(shù)據(jù)中心的所有優(yōu)勢,但無需對其進(jìn)行管理。
But if you remember all the processed movies are stored in Amazon S3. How does Netflix get it to OCAs? It is achieved by the process called Proactive Caching. Netflix is known to have highly accurate predictive system. It already knows what the viewers in different locations would like to watch next and when they would like to watch it as well. The predicted videos are copied to OCAs at respective locations and by having movies readily available to stream even before viewer has asked for it, Netflix ensures a great viewing experience.
但是,如果您還記得所有處理過的電影,它們都存儲在Amazon S3中。 Netflix如何將其用于OCA? 它是通過稱為“ 主動緩存”的過程來實現(xiàn)的。 眾所周知,Netflix具有高度準(zhǔn)確的預(yù)測系統(tǒng)。 它已經(jīng)知道不同位置的觀眾接下來想看什么,以及他們什么時候也想看。 Netflix將預(yù)測的視頻復(fù)制到各個位置的OCA,并且即使在觀眾要求之前也可以隨時播放電影,從而確保了出色的觀看體驗。
OCAs at ISP DatacenterISP數(shù)據(jù)中心的OCA放在一起: (Putting All The Pieces Together :)
- The original high quality copy of the movie received from production houses is first uploaded to AWS S3. 從制作室收到的電影的原始高質(zhì)量副本首先被上傳到AWS S3。
- It is then broken down into chunks to transcode. After all the processing, multiple copies of the movie in are stored in S3, in different formats and resolutions to support across various devices and networks. 然后將其分解為大塊進(jìn)行轉(zhuǎn)碼。 完成所有處理后,將電影的多個副本以不同的格式和分辨率存儲在S3中,以支持各種設(shè)備和網(wǎng)絡(luò)。
- Next, the locations where people would prefer to watch this movie are predicted. These copies are then duplicated on OCAs closest to the predicted locations in advance, ready to serve the viewers when requested. 接下來,預(yù)測人們希望看這部電影的位置。 然后,這些副本會預(yù)先復(fù)制到最接近預(yù)測位置的OCA上,隨時可以根據(jù)要求提供給觀眾。
- When you request to play the movie, the app on your device fetches URLs for up to 10 different OCAs. The quality of network for these OCAs is then tested by the clients and the fastest and most reliable connection is selected. 當(dāng)您請求播放電影時,設(shè)備上的應(yīng)用會獲取最多10個不同OCA的URL。 然后,由客戶端測試這些OCA的網(wǎng)絡(luò)質(zhì)量,并選擇最快和最可靠的連接。
- Client constantly keeps on checking the connection and switches to the most stable and high-quality connection possible whenever needed, trying all the while to deliver a smooth viewing experience. 客戶會不斷檢查連接,并在需要時切換到最穩(wěn)定和高質(zhì)量的連接,并一直嘗試提供流暢的觀看體驗。
Pretty amazing, isn’t it?
太神奇了,不是嗎?
https://www.statista.com/statistics/250934/quarterly-number-of-netflix-streaming-subscribers-worldwide/
https://www.statista.com/statistics/250934/quarterly-number-of-netflix-streaming-subscribers-worldwide/
https://www.nytimes.com/2020/04/21/business/media/netflix-q1-2020-earnings-nflx.html
https://www.nytimes.com/2020/04/21/business/media/netflix-q1-2020-earnings-nflx.html
https://youtu.be/Bsq5cKkS33I
https://youtu.be/Bsq5cKkS33I
https://youtu.be/x9Hrn0oNmJM
https://youtu.be/x9Hrn0oNmJM
http://highscalability.squarespace.com/blog/2017/12/11/netflix-what-happens-when-you-press-play.html
http://highscalability.squarespace.com/blog/2017/12/11/netflix-what-happens-when-you-press-play.html
https://medium.com/@narengowda/netflix-system-design-dbec30fede8d
https://medium.com/@narengowda/netflix-system-design-dbec30fede8d
https://medium.com/refraction-tech-everything/how-netflix-works-the-hugely-simplified-complex-stuff-that-happens-every-time-you-hit-play-3a40c9be254b
https://medium.com/refraction-tech-everything/how-netflix-works-the-hugely-simplified-complex-stuff-that-happens-every-time-you-hit-play-3a40c9be254b
翻譯自: https://uxdesign.cc/netflix-system-design-ef5802426ad4
netflix 工作原理
總結(jié)
以上是生活随笔為你收集整理的netflix 工作原理_Netflix如何在屏幕后面工作?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 前端学习(3048):vue+eleme
- 下一篇: 工作398-关于e.currentTar