selpeel lankan alatheah

0 views
Skip to first unread message

Margit Szermer

unread,
Aug 2, 2024, 1:52:20 AM8/2/24
to enudrepke

Netflix used their internal spot market to save 92% on video encoding costs. The story of how is told by Dave Hahn in his now annual A Day in the Life of a Netflix Engineer. Netflix first talked about their spot market in a pair of articles published in 2015: Creating Your Own EC2 Spot Market Part 1 and Part 2.

At any point in time AWS has a lot of underutilized instances. It turns out so does Netflix. To understand why creating an internal spot market helped Netflix so much, we'll first need to understand how they encode video.

Netflix gets video from production houses and studios. First, Netflix validates the source file, looking for missing frames, digital artifacts, color changes, and any other problems. If problems are found, the video is rejected.

Netflix has a huge baseline capacity of reserved instances. They autoscale in and out 10,000s of instances a day from this pool. When Netflix autoscales down they have unused capacity. Unused capacity is a waste of money and spot markets are great way of soaking up all that unused capacity while also getting important work done.

So Netflix did a genius thing, they built their own internal spot market to process the chunked encoding jobs. The Engineering Tools team built an API exposing real time unused reservations at the minute level.

Netflix started their own internal spot market for the same reason Amazon did; cloud economics are all about driving higher machine utilization. Reserving instances saves a lot of money in AWS, it makes sense to extract the most value as possible out of those instances. Every microsecond CPUs are not working is a waste of money.

Back in the day, like many people, before it became clear AWS would become the eater of all infrastructure, I was brainstorming AWS startup ideas. I was pursuing some of the ideas I later detailed in Building Super Scalable Systems: Blade Runner Meets Autonomic Computing In The Ambient Cloud.

The kicker was security. Who would run code and put their data on an a random machine without a security guarantee? This was before containers. Though I had used Jails on FreeBSD to good effect, the idea of containers never occurred to me.

My idea was something like lambda, which was why in What Google App Engine Price Changes Say About The Future Of Web Architecture, I was disappointed when GAE pivoted towards a higher granularity system:

The basis of this conjecture/vision is the development and evolution of one of GAE's most innovative and far reaching features: task queues. It's a great feature that allows applications to be decomposed into asynchronous flows. Work is queued and executed at some later time. Instead the monolithic and synchronous model used originally by GAE, an application can be completely asynchronous and can be run on any set of machines. For a while now it has been clear the monolithic front-end instances have become redundant with the fruition of task queues.

The problem is task queues are still image based. Operation are specified by a URL that terminate inside a run time instance whose code template is read from an image. An image contains all the code an application can execute. It's monolithic.

When a web client URL is invoked it executes code inside a monolithic image. It's these large images that must be managed by GAE and why Google needs to charge you more. They take resources to manage, time to initialize, and while running take memory even if your app isn't doing anything.

A different idea is to ask why can't a request terminate at a task queue work item instead? Then the monolithic image could be dropped infavor of an asynchronous coding model. Yes, GAE would have to still manage and distribute these code libraries in some fantastical way, no simple task, but this would solve the matching work to resources granularity problem that they instead solved by going the other direction, that is making images the unit of distribution and instances the unit of execution. We'll talk more about the granularity problem next.

So with this super cool task queue framework and programming model being developed I felt sure they were ready to announce that the monolithic images would disappear, instances would disappear, and there would be an even finer pay for what you use billing model as a replacement. I was wrong. Again.

Driving this upheaval is that programs run on an abstract machine that uses resources that are quantized differently than the underlying physical machines. A server comes with only so much memory and CPU. Running programs use memory even when a program is idle. Google must pay for the machine resources used by an instance. Charging only for the resources used by a program instead of all the resources used to host a program creates an unsustainable and unprofitable pricing friction between the two models.

In other words, programs are deployed in big quanta, but run in small quanta. A smaller work granularity would allow work to be schedule in idle times, which is why I think the task queue model is superior.

While the lack of discount codes for older adults may seem unfair, the upside is that the standard Netflix plan is affordable for most people. It allows you to enjoy various movies, shows, documentaries, and more. However, the standard plan also includes ads, which can make the viewing experience frustrating for many people. Paying a larger fee allows you to do away with the more frustrating aspects of the basic plan, though this takes a larger chunk out of your wallet.

Netflix operates on a tiered pricing model, with each tier offering subscribers a distinct set of features. Below is an illustrative table and in-depth description demonstrating the distinct subscription plans and their corresponding costs.

However, the low monthly fee comes with a few drawbacks. The most significant annoyance is the presence of ads. Ads can interrupt an entrancing show or movie, taking you out of the zone. It also forces you to waste time watching things you might not be interested in.

Likewise, some TV shows or movies may not be available with the standard plan. Another downside is that you are limited to using Netflix on no more than two devices, such as your cell phone, tablet, or computer.

Above the standard subscriptions is a premium option. This is the best and all-inclusive plan that Netflix offers. You can watch whatever you want on four supported devices. Ultra HD is available, as is Netflix spacial audio. This immerses you in your shows and movies like never before.

This is a special offer, and not all T-Mobile plans include a free Netflix subscription, so make sure you choose the right one before signing up. You can always contact a T-Mobile representative to help you make the right choice.

Another great option for saving money while still enjoying Netflix is account sharing. While Netflix might not offer special discounts for seniors, individuals with disabilities, or Medicaid beneficiaries, it does extend the courtesy of shared access among family and friends.

Recently, Netflix has made some efforts to minimize or eliminate account sharing. Many who regularly use this streaming platform have responded to this negatively. While account sharing remains a useful loophole, it may not be around forever. Many are turning to other streaming providers, such as Hulu, Amazon Prime, or Disney+, for this reason.

The popularity of platforms like Netflix often attracts fraudulent activities, with some scammers exploiting the platform to ensnare unsuspecting individuals. When confronted with offers or links promising discounts or free trials, you should be careful.

Clicking on these links may bring you to fake websites attempting to steal your information or infect your device with a virus. This can cause a lot of unnecessary stress and may even cause you to lose money.

Netflix has yet to offer a disability discount. This may make it difficult for those with disabilities on tight budgets to afford a Netflix subscription. However, the platform does offer closed captioning and audio descriptions, making content accessible to many viewers with disabilities.

Netflix does not have a dedicated Medicaid discount. Many senior citizens enjoy Netflix primarily by sharing their accounts with their friends or family. They can then use Netflix for free or at least by paying a small fee.

Understanding subscription costs and potential discounts can help you access the entertainment you love for a fair price. While Netflix might not offer senior, disability, or Medicaid discounts, avenues to optimize your streaming experience still exist. Choosing other streaming services, sharing accounts, and choosing a lower-priced plan are all options that can help you save money.

When Netflix transitioned to streaming, gradually leaving the DVD business behind, it became one of the greatest revenue-growth success stories in history. Netflix completely dominated the streaming market until its current rivals entered the market.

This is an example of the law of diminishing returns (or its equivalent, the law of increasing costs). Each additional dollar invested in advertising will have a worse marginal return than the previous dollar because it is probably directed at a subscriber who is more difficult to persuade.

Up to here, everything is fine for Netflix. However, as competitors HBO (with HBO Max), Amazon Prime (with Prime Video), Disney (with Disney+), and others enter the market, demand elasticity increases. With more substitutes, customers become more sensitive to changes in prices or content offered.

One of the problems for Netflix was that it was at the mercy of the large content distributors like HBO. It seemed that all the surplus was going to go to the owners of series and movies and that Netflix was going to take a loss.

At that point, Netflix decided to change its business from brokering content to creating content (or at least getting exclusive rights to new content). However, it is not at all easy to create winning content for an audience that is terribly critical, temperamental, and susceptible to short-term fads.

90f70e40cf
Reply all
Reply to author
Forward
0 new messages