Posted on

How Load Balancing Makes Netflix and Chill Better

These days, it seems everyone is using more and more internet data so they can stream video. But if you’re like many RVers, you’re forced to access the internet much of the time using cellular connections that don’t have the high speeds you’re used to in the city. In rural America, where lots of RVers like to be, cell service speeds typically are in the ~5-15Mbps range. These speeds can be even less if you’re using a low-cost data plan that is “network managed,” which is “cellular speak” for: you are low in the queue with respect to network priority!

To combat this challenge, many RVers rely on multiple cellular connections with more than one carrier. But by themselves, those don’t resolve the problem. If you’re watching a Netflix video, it doesn’t matter that you have two or three cellular connections plus the RV park’s WiFi, unless you can use them all at the same time.

How Load Balancing Provides Multiple “Pipes”

In an earlier post, we provided an introduction as to how Load Balancing can enable you to use multiple cellular connections at the same time. With Load Balancing, it’s as if you have parallel “pipes” carrying data to your router. Even though the download speed of the data going through each of those pipes doesn’t change, the fact that there are more of them means that more data can flow to your router in each time interval. Think of the pipes as if there was water in them. If each pipe can provide 1 gal per minute, then, by having 5 of them, we can now get 5 gal per minute of water.

Visualization of Multiple Water / Data Pipes

So, let’s imagine that you have two internet connections, each providing 5Mbps of data (when they’re not being network managed). Even if you aren’t watching Netflix, you may have several people in the family surfing on laptops or iPads, or playing video games. Each person is capable of consuming several megabits per second in data. Don’t forget that Facebook and YouTube video are still video even if the screen size is small and the resolution is low.

It’s fairly easy to envision that having multiple internet “pipes” makes it easier for multiple people to engage in all these activities. It’s as if one pipe is providing data to mom, a second one to dad and, maybe a third to a teenage gamer.

A conceptual illustration of Load Balancing is shown in the following graphic which shows data calls going to all available internet connections in turn:

Example of Load Balancing Data Paths

The above concept of multiple data paths to multiple end users is fairly easy to understand. However, what’s a lot harder to understand is how Load Balancing helps when you want to watch Netflix. That’s because in our minds many of us envision a Netflix data stream as being just that, a continuous flow of data bits that come down the wire to us. It turns out that’s hardly at all how Netflix gets video to us.

How Netflix Delivers Content

The first thing you need to understand is that giant Content Delivery Networks (CDN) like Netflix are cloud-based, distributed systems that don’t exist in a particular location. So, when you click on a movie to watch, one of the first things the CDN determines is where you are located and what ground-based link is best suited for sending the data to you. If you’re enjoying yourself at the Grand Canyon, there’s no point to sending your movie through the internet from New York, for example.

Once the CDN decides where it’s going to send your movie from, it has to determine the speed of the data link you are using so it can send your video in a resolution your connection can handle. And it has to have available resolutions for both higher and lower speed links just in case your speed changes for better or for worse while you are watching.

Now, most of us have experienced the changes in resolution that Netflix (or other CDNs) can employ when your speed decreases. But what most of us don’t realize is that better CDNs, like Netflix, can even remove individual video frames in order to reduce the data flow! Resolution-reduction is sort of what happens when the reduced data rate can’t be accommodated by frame elimination and other tricks.

By now, some you are wondering how all of this helps explains how Load Balancing makes it easier to watch a Netflix video. Well, the answer to that is that once Netflix has decided how much data you need (based on the data rate your connection can handle), it doesn’t send it as a continuous stream. Rather, it sends it to you by the bucketful, and that’s where our water analogy comes into play.

How Buffering Comes Into Play

You may not realize that the CDNs provide you a buffer of 5-10 minutes of video before you start watching. That’s why there’s always a pause before your video begins, no matter how fast your connection is. Your buffer is filling!

Once your buffer is full and you start watching, all the CDN cares about is keeping the buffer level full. Contrary to how we might envision it working, the CDN keeps your “bucket full” using all the data it can get delivered to you. Every time your buffer gets low, it issues a call for more data. If you think of your buffer as a bathtub, then you can see that having extra pipes will enable it to fill faster. All that matters is that the level in the tub fills faster than the water goes down the drain. If the tub gets empty, the data stream stops and you get the dreaded re-buffering symbol.

In the following graphic, you can see the buffer filling and then repeated “data calls” to keep it filled. Furthermore, you can see that Netflix is relying on three TCP data streams to provide the data. Hmm, did I just say three data flows? Doesn’t that seem analogous to our multiple pipes?

Bandwidth Graph of Netflix Buffer

Although I admit that the above graphic was obtained from an outside source (Singh, 2018), the following one was taken directly from my WiFiRanger Aspen’s real-time data utilization display. For simplicity, I have only shown one data source, but the general nature of the graph is the same. Because my data streams were much slower than those used in the first example, the initial fill period took longer. However, after the initial fill period, the spikey nature of the refill data calls are very similar to those in the first illustration. Although it took some time for the initial fill period to complete, the video had started playback early in the process. There is no doubt that Netflix realizes people are impatient and wouldn’t want to wait for their video to begin.

Bandwidth Graph of WiFiRanger During Netflix Buffer

The key point to understand is that a video “stream” is NOT a steady stream of data in sequential order.

Clearly, the more “pipes” you can use to contribute to this refilling process, the better your video stream will be.

In summary, by allowing you to use multiple data pipes to fill your “bucket,” Load Balancing makes it easier to maintain high-quality data streams even with a bunch of relatively slow-speed connections.


References:

Netflix – How It (Actually) Works: Insights for Network Managers, by Harneet Singh, Apr 12, 2018

Load Balancing Techniques and Optimizations, by Jason Potter, Posted on April 2, 2019