2. Transcoding Challenges Transcoding converts video from one encoded format to another format. Effective real-world transcoding use requires significant CPU power Rendering farms Significant capex Grid environment
3. In the early days Before Amazon, transcoding large amounts content was limited to an exclusive audience Large companies with budget to support significant capex (rendering farms, entertainment and production houses, SGI) Parallel encoding processes across many machines Machines largely go unused Wasting electricity, IT operations costs, maintenance
4. Problems with a transcoding system Batch encoding can either be a horizontal scaling effort or a vertical one Faster computers don’t always result in significantly reduced encoding times Some codecs unable to multithread Generally more efficient to do one 1x transcode per CPU (core) Amazon solves the "hurry up and wait" problem in encoding and transcoding
7. Encoding: How many servers? Most cost-efficient to maximize 1 hour (~55 minutes) of usage 1,000 30 minute videos ~15 minutes encoding time per video (2x linear rate) (Total number of videos * average encode time in minutes) / (55 (minutes) * number of cores) = number of servers
8. Encoding: Non-scientific cost comparison Traditional datacenter $3,000 / server * $1,200/yr electricity (8-core) (1,000 (videos) x 15 (minutes per video)) / ( 55 (minutes) x 8 (cores))= 34 (servers) 34 * $3,000 * $1,200 = $142,800 first year capex and run costs EC2 (1,000 (videos) x 15 (minutes per video)) / ( 55 (minutes) x 20 (cores))= 14 (servers) 14 * $0.68 = $9.52 in costs
9. Conclusion Elastic grid Ideal for scalable projects, rapid prototyping Collect metrics on CPU, network, disk IO Launch/terminate instances from metrics Encoding/transcoding/map-reduce Cost-savings Terminate instances after certain time period Most cost-efficient to maximize 1 hour of usage Use infrastructure-as-a-service where savings make sense (either cost or operational)