35

Building Highly Scalable Immersive Media Solutions on AWS

Embed Size (px)

Citation preview

Page 1: Building Highly Scalable Immersive Media Solutions on AWS
Page 2: Building Highly Scalable Immersive Media Solutions on AWS

Building Highly Scalable Immersive Media Solutions on AWS

Konstantin Wilms & Chad SchmutzerAmazon Web Services

Page 3: Building Highly Scalable Immersive Media Solutions on AWS

INTRODUCTIONImmersive Media in the Cloud

Page 4: Building Highly Scalable Immersive Media Solutions on AWS

Origination Delivery

MULTI-CAMERA MEZ, LIVEOR VOD CONTENT

B2C PLAYBACK TO CONSUMEROR B2B DELIVERY

Stitching

Encoding

Bandwidth CDN

High

Availability

CameraSupport

Scalability

DevicesCost

Most of these can be tackled by utilizing media encoding and transport standards alongwith best practice cloud design patterns for low latency, elastic, highly available infrastructure

Immersive Media Challenges

Page 5: Building Highly Scalable Immersive Media Solutions on AWS

AWSMarketplace

AmazonElastic Transcoder

ElementalTechnologies

AMI ModelLicensed S/W

Minimal Disruption

ProxiesFast Integration

UGC & Prosumer

On-Prem & CloudLive, VOD, JITProfessional

DIY BYOPaaS / SaaS

BYOLSelf Contained

Custom Solutions

Media Processing on AWS

Page 6: Building Highly Scalable Immersive Media Solutions on AWS

VOD Workflow

G2

Distribution B2C (Viewers)

Live Workflow

G2

Archive

Source Encoder

B2B(Organizations)

A Cloud-Native Immersive Media Solution 360 Live & VOD Pipeline Infrastructure as Code Optimized Service

Consumption Lowest Possible Cost Cloud Native Patterns 100% Open Source Designed for Growth Reference Architecture

Page 7: Building Highly Scalable Immersive Media Solutions on AWS

16 Regions – 42 Availability Zones – 68 Edge Locations Region & Number of Availability ZonesAWS GovCloud (2) EU

Ireland (3)US West Frankfurt (2)Oregon (3) London (2)Northern California (3)

Asia PacificUS East Singapore (2)N. Virginia (5), Ohio (3) Sydney (2), Tokyo (3),

Seoul (2), Mumbai (2)CanadaCentral (2) China

Beijing (2)South AmericaSão Paulo (3)

…with Global Deployment Capability

Announced RegionsParis, Ningxia

Page 8: Building Highly Scalable Immersive Media Solutions on AWS

So where do we start?

Page 9: Building Highly Scalable Immersive Media Solutions on AWS

BUILDING A PIPELINEMapping Services & Partners to an End to End Workflow

Page 10: Building Highly Scalable Immersive Media Solutions on AWS

Ingest Store Transform Process

PUSH OR PULLMEZ, LIVE & VOD

CREATE A CENTRALIZEDCONTENT LAKE ON S3

MEDIA DELIVERY AND/ORHANDS-ON POSTPRODUCTION

SCALE OUT ON ELASTIC CAPACITY FOR ALL PROCESSING

Page 11: Building Highly Scalable Immersive Media Solutions on AWS

Ingest

PUSH OR PULLMEZ, LIVE & VOD

AWS Services

AWS Direct Connect: For high bandwidth, deterministic live media Amazon S3 Transfer Acceleration: Remote location ingest AWS Snowball: Petabyte scale data transfer (in and out) Amazon Cloudfront: Global content delivery network Elemental Appliances: On-prem video encode/prep for ingest

Partners

Media Ingest

Page 12: Building Highly Scalable Immersive Media Solutions on AWS

AWS Services

Amazon S3: Highly scalable, durable object storage Amazon Glacier: Secure, durable, petabyte-scale data archival Amazon EFS: Simple, elastic, scalable file system Amazon EBS: Persistent block storage AWS Marketplace: Partner solutions for storage (on/off-prem)

Partners

Store

CREATE A CENTRALIZEDCONTENT LAKE ON S3

Asset Storage

Page 13: Building Highly Scalable Immersive Media Solutions on AWS

Transform

MEDIA DELIVERY AND/ORHANDS-ON POSTPRODUCTION

AWS Services

Amazon EC2: Scalable CPU/GPU computing capacity Amazon Workspaces: GPU accelerated desktops in the cloud AWS Marketplace: Partner solutions for storage (on/off-prem) Amazon Appstream: Run existing Windows Applications in the cloud

Partners

Content Transformation

Page 14: Building Highly Scalable Immersive Media Solutions on AWS

Process

SCALE OUT ON ELASTIC CAPACITY FOR ALL PROCESSING

AWS Services

Amazon EC2 Spot: Low Cost spare GPU/CPU capacity at high scale AWS Batch: Fully managed batch processing at any scale Amazon ECS: High scale, high performance container management ThinkBox Deadline: Hassle-free scheduling for rendering & compute Elemental Cloud: On-demand, scalable video processing

Partners

Elastic Processing

Page 15: Building Highly Scalable Immersive Media Solutions on AWS

What if we maximized EC2 Spot usage

…across the entire pipeline

VOD Workflow

G2

Distribution B2C (Viewers)

Live Workflow

G2

Archive

Source Encoder

B2B(Organizations)

Page 16: Building Highly Scalable Immersive Media Solutions on AWS

EC2 SPOTCompute Capacity at Scale

Page 17: Building Highly Scalable Immersive Media Solutions on AWS

On-Demand

Pay for compute capacity by the hour

with no long-term commitments

For spiky workloads, or to define needs

AWS EC2 Consumption ModelsReserved

Make a low, one-time payment and receive a significant discount on

the hourly charge

For committed utilization

Spot

Bid for unused capacity, charged at a Spot Price which fluctuates based on supply and demand

For time-insensitive, transient, or stateless

workloads

Page 18: Building Highly Scalable Immersive Media Solutions on AWS

Spare Capacity at Scale• AWS has more than a

million active customers in 190 countries.

• Amazon EC2 instance usage has increased 93% YoY, comparing Q4 2014 and Q4 2013, not including Amazon use.

Page 19: Building Highly Scalable Immersive Media Solutions on AWS

EC2 Spot instances arespare EC2 On-Demand capacity

with very simple rules…

What are EC2 Spot Instances?

Page 20: Building Highly Scalable Immersive Media Solutions on AWS

Markets where the price of compute changes based on supply and demand

You’ll never pay more than your bid. When the market exceeds your bid you

get 2 minutes to wrap up your work

The Very Simple Rules of Spot

Page 21: Building Highly Scalable Immersive Media Solutions on AWS

Since Spot instances typically cost 50-90% less than On-Demand, you can increase your compute capacity by 2-10x within the same budget

Or you could save 50-90% on your existing workload

Either way, you should try it!

Get the Best Value for EC2 Capacity

Page 22: Building Highly Scalable Immersive Media Solutions on AWS

AZ1

AZ2

Frankfurt Total Capacity

P2 C4 M4 I2 R4 D2

Shared

Dedicated

Shared

Dedicated

Understanding EC2 Capacity

Page 23: Building Highly Scalable Immersive Media Solutions on AWS

$0.27 $0.29$0.50

2b 2cc2a

8XL

$0.30 $0.16$0.214XL

$0.07 $0.08$0.082XL

$0.05 $0.04$0.04XL

$0.01 $0.04$0.01L

C4$1.76

OnDemand

$0.88

$0.44

$.22

$0.11

Each Instance Family

Each Instance Size

Each Availability Zone

In every Region

Is a separate Spot Market

Capacity & Spot Markets Recap

Page 24: Building Highly Scalable Immersive Media Solutions on AWS

Bid Price vs. Market Price

50% Bid

75% Bid

You pay the market price

25% Bid

Page 25: Building Highly Scalable Immersive Media Solutions on AWS

Fault toleranceStateless Multi-AZ Loosely coupledInstance Flexibility

EC2 Spot Best Practices

Page 26: Building Highly Scalable Immersive Media Solutions on AWS

~ 21% less than 1 hour~ 35% less than 2 hours~ 40% less than 3 hours

In total roughly 50% of all instances live less than 6 hours

My Instances Cannot be Interrupted!

Page 27: Building Highly Scalable Immersive Media Solutions on AWS

Using a single additional parameter

Run continuously for up to 6 hours

Save up to 50% off On-Demand pricing

$1

EC2 Spot Blocks

Page 28: Building Highly Scalable Immersive Media Solutions on AWS

Requested 1000 vCores over 30 days

Minimum 960 vCores Mode 1024 vCores Average 1012 vCores

Average Price of $0.012 per vCore

250

350

450

550

650

750

850

950

1050

1150

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

Number of Cores Running Average Hourly Price Per Core Savings of over 80%

Batch Processing with EC2 Spot

Page 29: Building Highly Scalable Immersive Media Solutions on AWS

DESIGNMedia Protocols, Transports & Cloud Architecture Patterns

Page 30: Building Highly Scalable Immersive Media Solutions on AWS

Source

Playout

http://bit.ly/2fRnwvv

Secure Compute/Rest/In-Flight (SSM) Live & On-Demand (live recordings to VOD) RTMP live ingest (RTP-FEC optimal, i.e. 2022) Ingest – bitrate conform & pre-stitching 4k, AVCI, HEVC, H264/AAC – HLS + DASH ‘Internet’ / Direct Connect Ingest EC2 Spot for transcode (& proxies!) using dynamic

CPU/GPU FFMPEG on NGINX ECS - Docker to abstract dependencies ForgeJS DASH, Clappr HTML5, Unity Mobile Origin-Based remap using FFMPEG (PGM) &

Facebook transform filters

End to End Media Requirements

Page 31: Building Highly Scalable Immersive Media Solutions on AWS

Infrastructure as Code – Error-Free Repeatability (Cloudformation) Event-Based Pipelines – NGINX & S3 bucket events (nVOD) Circuit Breaker Pattern – Proactively Drain ALBs (Spot) Origin Proxy Pattern - Edge@Origin (fan out processing) Service Discovery – via EC2 Instance Tagging, DNS Bootstrap / Container Pattern – immutable infrastructure Multi Server Pattern – Multi-AZ (automatically consume all AZs) Decoupling Pattern – asynchronous & resilient (SQS, SNS)

Cloud Architecture Patterns

Page 32: Building Highly Scalable Immersive Media Solutions on AWS

SOLUTION ARCHITECTURELive & nVOD Immersive Media Delivery

Page 33: Building Highly Scalable Immersive Media Solutions on AWS

Backup Origin

Primary Origin

G2

G2

Ingest Bucket

S3 Events SQS Queue

Source Encoder

SPOT or On-Demand

Edge Cache Fleet

Failover

ALB CloudFront Viewers

Diversified SPOT Fleet

G2

M4

Egress Bucket

Direct

ConnectMulti

Tenancy

MezArchival

MultiCDN

ContainerEncoding

Full OTTCMS / DRM

GPU / CPUBatch

Encoding

Page 34: Building Highly Scalable Immersive Media Solutions on AWS

Reference Architecture Available Soon (ask us!)

Page 35: Building Highly Scalable Immersive Media Solutions on AWS

Thank You!