They have reserved a lot of instances in EC2.
https://aws.amazon.com/ec2/pricing/reserved-instances/
You can get a steep discount for reserving instances. A reserved instance is typically reserved for a number of years.
When these aren't in use, then they can put them into their video encoding pool and they are essentially free.
I guess they reserve lots of instances to make sure they have the capacity at peak times and to access some serious discounts.
Because they worry it will be if they fail. See also multi year contracts for software that’s terrible.
If true, that would be pretty interesting - priority is a common feature to implement on top of a naive scheduler, but 'nice' values are harder to connect to dollar amounts.
Unfortunately, the article doesn't go into any detail if that is, indeed, what they implemented.
It's unlikely that Netflix implemented anything this complex for video encoding, since Cook is only valuable when you're scheduling jobs from parties with conflicting incentives, rather than a singular purpose like "encode all Netflix video".
>Cook is a powerful batch scheduler, specifically designed to provide a great user experience when there are more jobs to run than your cluster has capacity for.
It's expensive to operate thousands of instances in AWS, so I presume there's also a relentless push internally to drive down costs.
Thanks for the link to Cook, that's fascinating. The fact that it plugs into Mesos seems quite useful!
Using other servers as lower priority job servers is a great way to increase utilization during off-peak times and save on server costs. You have to think about what happens if either a batch job or the server's main task runs away with all the system resources, so it can get tricky. A spot market might actually be an interesting solution to some of those problems, though for most of us, just using disk quotas and nice levels will be enough.
...
> But if you look, encoding has a bursty workload pattern. That means the farm would be underutilized a lot of the time.
> ...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.
They're running multiple encoding tasks at once (an understatement) and when one of these is using less CPU, they shift another encoding task to that same machine.
For example if one of their servers is using 50% CPU, they can fill the remaining 50% with video encoding tasks.
But obviously I don’t know any better than you. That’s just my takeaway from the vaguely worded article.
So if you have 50 cpu hours reserved capacity per hour and during parts of the day you're using only 10h, they can allocate the remaining 40h which they reserved and paid upfront for encoding.