I pulled this chapter together from dozens of sources that were at times somewhat contradictory. Facts on the ground change over time and depend who is telling the story and what audience they're addressing. I tried to create as coherent a narrative as I could. If there are any errors I'd be more than happy to fix them. Keep in mind this article is not a technical deep dive. It's a big picture type article. For example, I don't mention the word microservice even once :-)
Given our discussion in the What is Cloud Computing? chapter, you might expect Netflix to serve video using AWS. Press play in a Netflix application and video stored in S3 would be streamed from S3, over the internet, directly to your device.
Another relevant factoid is Netflix is subscription based. Members pay Netflix monthly and can cancel at any time. When you press play to chill on Netflix, it had better work. Unhappy members unsubscribe.
The client is the user interface on any device used to browse and play Netflix videos. It could be an app on your iPhone, a website on your desktop computer, or even an app on your Smart TV. Netflix controls each and every client for each and every device.
Everything that happens before you hit play happens in the backend, which runs in AWS. That includes things like preparing all new incoming video and handling requests from all apps, websites, TVs, and other devices.
In 2007 Netflix introduced their streaming video-on-demand service that allowed subscribers to stream television series and films via the Netflix website on personal computers, or the Netflix software on a variety of supported platforms, including smartphones and tablets, digital media players, video game consoles, and smart TVs.
Netflix succeeded. Netflix certainly executed well, but they were late to the game, and that helped them. By 2007 the internet was fast enough and cheap enough to support streaming video services. That was never the case before. The addition of fast, low-cost mobile bandwidth and the introduction of powerful mobile devices like smart phones and tablets, has made it easier and cheaper for anyone to stream video at any time from anywhere. Timing is everything.
Building out a datacenter is a lot of work. Ordering equipment takes a long time. Installing and getting all the equipment working takes a long time. And as soon they got everything working they would run out of capacity, and the whole process had to start over again.
The long lead times for equipment forced Netflix to adopt what is known as a vertical scaling strategy. Netflix made big programs that ran on big computers. This approach is called building a monolith. One program did everything.
What Netflix was good at was delivering video to their members. Netflix would rather concentrate on getting better at delivering video rather than getting better at building datacenters. Building datacenters was not a competitive advantage for Netflix, delivering video is.
It took more than eight years for Netflix to complete the process of moving from their own datacenters to AWS. During that period Netflix grew its number of streaming customers eightfold. Netflix now runs on several hundred thousand EC2 instances.
The advantage of having three regions is that any one region can fail, and the other regions will step in handle all the members in the failed region. When a region fails, Netflix calls this evacuating a region.
The header image is meant to intrigue you, to draw you into selecting a video. The idea is the more compelling the header image, the more likely you are to watch a video. And the more videos you watch, the less likely you are to unsubscribe from Netflix.
The first thing Netflix does is spend a lot of time validating the video. It looks for digital artifacts, color changes, or missing frames that may have been caused by previous transcoding attempts or data transmission problems.
A pipeline is simply a series of steps data is put through to make it ready for use, much like an assembly line in a factory. More than 70 different pieces of software have a hand in creating every video.
The idea behind a CDN is simple: put video as close as possible to users by spreading computers throughout the world. When a user wants to watch a video, find the nearest computer with the video on it and stream to the device from there.
In 2007, when Netflix debuted its new streaming service, it had 36 million members in 50 countries, watching more than a billion hours of video each month, streaming multiple terabits of content per second.
At the same time, Netflix was also devoting a lot of effort into all the AWS services we talked about earlier. Netflix calls the services in AWS its control plane. Control plane is a telecommunications term identifying the part of the system that controls everything else. In your body, your brain is the control plane; it controls everything else.
In 2011, Netflix realized at its scale it needed a dedicated CDN solution to maximize network efficiency. Video distribution is a core competency for Netflix and could be a huge competitive advantage.
The number of OCAs on a site depends on how reliable Netflix wants the site to be, the amount of Netflix traffic (bandwidth) that is delivered from that site, and the percentage of traffic a site allows to be streamed.
Within a location, a popular video like House of Cards is copied to many different OCAs. The more popular a video, the more servers it will be copied to. Why? If there was only one copy of a very popular video, streaming the video to members would overwhelm the server. As they say, many hands make light work.
Right now, up to 100% of Netflix content is being served from within ISP networks. This reduces costs by relieving internet congestion for ISPs. At the same time, Netflix members experience a high-quality viewing experience. And network performance improves for everyone.
What may not be immediately obvious is that the OCAs are independent of each other. OCAs act as self-sufficient video-serving archipelagos. Members streaming from one OCA are not affected when other OCAs fail.
Yes, this is certainly the most obvious, but when was the last time you asked your provider how fast its offerings are now? If it's been a few years, it likely has new services (maybe even fiber) that could greatly increase your download speeds. Recently I switched from 250Mbps cable to 1Gbps fiber for $10 less a month. When I canceled the cable internet they said "Oh, we can reduce your rate by $30 a month, or increase your speeds for the same money." They, of course, never offered that without me saying I was canceling. Just something to keep in mind.
This is definitely the first place to start. If you stay with the same provider, usually it'll be able to flip the proverbial switch without sending a tech to visit your home. Afterward, you'll have faster internet. If you switch providers (from cable to fiber, for example), the new provider will probably have to send someone to your house to install it.
The Wi-Fi router that you get for free from your internet provider is likely terrible. I upgraded my router the day before my new internet service was installed and I got a 20% boost in speed just from that. Many providers even charge for their basic routers, so if your provider allows it, you could save some money long-term by buying a good one outright and reducing your bill a bit each month.
You'll also likely get better range and better signal throughout your home with an upgraded router. If you've always had a bad connection in the back of the house, a better router might help with that.
A new or different router might also give you the option to connect via the 5GHz range ("normal" Wi-Fi is 2.4GHz). 5GHz is generally faster and has less chance of interference from other devices. It doesn't go through walls as effectively. Our favorite all-around budget option is the TP-Link Archer AX21.
If your house is particularly large, or the walls seem to be particularly obstructing, it's worth considering a mesh Wi-Fi system. These use multiple devices spread around your home instead of one single device. CNET's favorite mesh system is TP-Link Deco W7200.
Although convenient, Wi-Fi can be quite slow on some networks, especially if multiple people are streaming at once. Wired internet, aka Ethernet, is a lot faster and doesn't have issues with walls, interference or distance (well, not in a house, anyway). Though running wires can be annoying, it provides the most reliable connection and can be worth doing on your main TV at least.
If you want to use a wire, check your device. Most streamers lack the Ethernet port required for a wired connection, but cheap $15 USB adapters are available for the Chromecast with Google TV and Amazon's Fire TV sticks. Most Roku devices don't work with Ethernet, unfortunately. The exceptions are the Roku Ultra, which has a built-in Ethernet port, and the Roku Express 4K, Roku Express 4K Plus, Streambar and Smart Soundbar Pro, which all work with an optional Ethernet adapter.
Streamers with Ethernet built in, no adapter required, are generally more expensive, but they could be worthwhile if you want a simpler hookup or prefer Roku's system. Our favorite streamers with built-in Ethernet are the Roku Ultra and the Apple TV 4K.
Simply changing the location of your Wi-Fi router could help a lot. If it's on or near the ground, in a closet or at the far end of your house, you could be limiting the signal and speed without even realizing it. Wi-Fi can go through walls, but being high up and with fewer walls between the router and streamer will make a difference. If the router has antennas, positioning them correctly can also help (one vertical and one horizontal).
The same is true on the other end. If you've got the streamer in a cabinet, that's not helping either. In a perfect world, the streamer would have a direct line of sight with the router. This isn't necessary, but everything you place between the two of them decreases the signal and potentially lowers the speed.
90f70e40cf