SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Prime Video: Delivering
the Amazing Video Experience
C T D 2 0 3
Nick Benson
Software Development Manager
Amazon Prime Video
Harrison Clement
Systems Development Engineer
Amazon Prime Video
Chaitanya Solapurkar
Software Development
Engineer
Amazon CloudFront
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What to expect from the session
• Overview of the Prime Video Business Case
• Challenges:
• Global scale
• Large catalog
• High traffic
• Resource management
• Customer satisfaction
• Tying it All Together
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prime Video
Our Mission: Deliver the best possible video experience to
millions of customers across hundreds of different countries.
• More than 100 million Prime Customers globally
• Available in over 200 countries
• Audio Tracks for up to 22 languages
• Thousands of different types of devices
• 10K+ End-User Networks
• Many terabits per second of data streamed to customers
• Live and On-Demand Content
• Highly variable network infrastructure
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Video
Quality
Playback
Start time
Reliability
Time Behind
Live
Prime Video
Tradeoffs are important
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prime Video
Continuously defining the next rung in the ladder to improve playback
customer experience for our customers
2. Measure3. Optimize
1.Deliver
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prime Video traffic impacts the internet
• In the Americas, Prime Video generates 7.74%* of all downstream traffic
• In the EU, this number is 6.06%*
12:00:00 AM 12:00:00 AM 12:00:00 AM 12:00:00 AM 12:00:00 AM
Time in UTC
US Traffic Profile (UTC)
*https://www.sandvine.com/hubfs/downloads/phenomena/2018-phenomena-report.pdf
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Event forecasting planning
High Profile Events like Thursday Night Football and Prime Original releases require
accurate forecasting and careful planning
1/1/00 1/11/00 1/21/00 1/31/00
Daily VOD Streams
1/1/1900 3/21/1900 6/9/1900 8/28/1900 11/16/1900
Average Concurrent Streams per Hour
Series1 Series2
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prime Video: Protect Amazon resources
Reducing Calls to Origin
Asset Caching:
• Mid-Tier Caching for Live Traffic
• Large Cache Width Distribution to reduce Origin
Traffic for VOD long tail
Prime Video Service Protection:
• Cacheable Manifests Customized for Customer,
Delivery, and Device Attributes
Lambda Use Cases:
• Server Side Ad Insertion at the Edge
• Dynamic Manifest Thinning and Integration
Cached
Responses
+
Stateless
Compute
Content
Requests
Origin
Mid-
Tier
POP1 POP2
Mid-
Tier
POP3 POP4
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon CloudFront global footprint
150 Points of Presence (POP)
• 139 Edge locations
• 11 Regional Edge Caches
• In 65 cities across 29 countries
CloudFront Edge locations:
• Close to the viewers
• Connection termination
CloudFront Regional Edge Cache:
• Have larger cache width than any individual
Edge location
• Mid-tier cache between your origin server and
globally distributed Edge locations
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CloudFront traffic management
Reaching a POP
• Latency-based routing (typically)
• Capacity Management
• Load Prediction
• Flashcrowd handling
• Link Aware Routing
• DDoS detection and mitigation
Edge Locations
8x Traffic
Surge during
the event
Half-time
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CloudFront traffic management
Inside a POP
• Load balancing
• TLS Encryption and HTTPS
• HTTP/2
• Persistent connections
• Full and Partial object requests
• Collapsed Forwarding
• Throttling
Request
Response
Regional
Edge CacheEdge
location
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prime Video traffic growth on CloudFront
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
19…
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Title popularity curve
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
0% 2% 4% 6% 8% 10% 12%
Customer Session vs Catalog Distribution
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prime Video: Very large catalog
• Title Options through Subscriptions, TVOD, Self-Published Platforms
• Each Title Produces Large Set of Encodes
• Many Languages
• Versions Edited for Territory Compliance
• Package Formats: MSS, DASH, HLS, MP4
• Device Capabilities: H.264, HEVC, CVBR, CBR, UHD, HDR10, DolbyHDR
• Each Bitrate Separate Encode
• Continued growth
• Problem: CDNs cannot cache all content on all edges due to limited
cache space
• Scaling Wide: Cache Optimization
• Sharding library by title popularity (optimizing popular content)
• Caching the long-tail on CloudFront
• Using the Range Header for Partial GETs
Catalog
shard2 shard3shard1 shard4
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prime Video demand profile on CloudFront
• In HTTP Adaptive
Streaming, media is
requested in discrete
chunks and played back
• Video players can switch
among different:
• Bitrates
• Languages
• Package Formats
• Demand curve seen at
CloudFront Edge locations
is different compared to
Title Popularity curve 0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
NetworkBytes
Disk Bytes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Improving cacheability on CloudFront
• TTL - long-lived v/s short-lived v/s
dynamic objects
• Reduce variants to improve cacheability
• Request Headers
• Cookies
• Query Strings
• Cache Errors – Protect Origin
• Customize Error Caching Minimum TTL
• CloudFront can deliver stale content if Origin
is unreachable
• Tune Origin timeouts
• Origin Failover
Request
Response
Regional
Edge
Cache
Edge
location
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Self-service configuration
• Incremental level of complexity
• Manual
• Incremental level of complexity
• Manual  programmatic
• Incremental level of complexity
• Manual  programmatic  automated
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Rapidly changing business and technology
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prime Video Delivery
CloudFront provides self-service rapid configuration
Using AWS tools, Prime
Video can automatically
rapidly deploy distributions
to meet business needs
Region
CloudFormation Resources
Client
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prime Video: Protect customer experience
Public Internet Fault
Mitigation
• Enabling Client Failover
• CDN Switch, Origin Switch
• CDN Selection
• Measure CDN performance per
segment
• Weight CDNs according to segment
performance
Customer ISP
Peering
CDN1 CDN2
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Quantifying customer experience
• Prime Video measures playback performance to optimize delivery
• Metrics are carefully chosen to reflect the customer streaming experience
Prime Video Analytics
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Segment Aggregated DataSession Aggregated Input CDN Weights per Segment
CDN balancer pipeline
Temporal 1
Data Table
Temporal 2
Data Table
Temporal 3
Data Table
CDN Segment
Metrics
Compute
CDN Weight
Decision
Compute
CDN Shifted
Weights
Data Filtering
Temporal 1
Metrics Table
Temporal 2
Metrics Table
Temporal 3
Metrics Table
Load Batched
Decisions
Write Policy
CDN Weights
Policy
Prime Video
Stream
Processor
Stream
Processor
Output
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Improving customer experience together
Prime Video
• Zero Buffer
Streams
• Concurrent
Streams
CloudFront:
Behind the Scenes
• Load balancing
improvements
• Popular objects
• Server load
• System tuning
• Disk performance
• Kernel
parameters
• Cache Policy
Week 1 Week 2 Week 3 Week 4 Week 5 Week 6
95
96
97
98
99
100
ZeroBufferRate
ConcurrentStreams
PV Re-Buffers on CF vs PV CF Traffic Allocation
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CloudFront metrics and reports
• CloudWatch Metrics
• Requests
• Bytes Downloaded
• Bytes Uploaded
• Total Error Rate
• 4xx
• 5xx
• Reports
• Usage
• Requests
• Bytes
• Popular Objects
• HTTP Status Codes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Querying CloudFront logs using Amazon Athena
SELECT COUNT(*) AS ct, uri FROM cloudfront_logs_2
WHERE status > 500 GROUP BY uri ORDER BY ct DESC;
SELECT COUNT(*) AS ct, requestip FROM
cloudfront_logs_2 WHERE status = 404 GROUP BY
requestip ORDER BY ct DESC;
#Fields: date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status
cs(Referer) cs(User-Agent) cs-uri-query cs(Cookie) x-edge-result-type x-edge-request-id x-
host-header cs-protocol cs-bytes time-taken x-forwarded-for ssl-protocol ssl-cipher x-
edge-response-result-type cs-protocol-version fle-status fle-encrypted-fields
2018-09-13 09:21:31 CDG54 458 212.84.57.66 GET d3i3qsqe3g3tmp.cloudfront.net
/dash/9097/5acf3fa84056f.mpd 304 http://videos.example.com/dash/9097/5acf3fa84056f.mpd
Mozilla/5.0%2520(Windows%2520NT%25206.1;%2520Win64;%2520x64)%2520AppleWebKit/537.36%2520(K
HTML,%2520like%2520Gecko)%2520Chrome/65.0.3325.181%2520Safari/537.36 - - Hit
O_7sNozG9s9NPrg3W8y_K55uXA45TBBxe-JCLPUQ_kTjfAtfpu_-Pg== videos.example.com https
329 0.024 - TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 Hit HTTP/2.0 - -
Amazon CloudFront
Access Logs
Amazon S3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Key takeaways
• Forecasting and planning
help with traffic scaling
• Understand catalog demands
• Adapt AWS tools to your
development lifecycle
• Drive Customer Experience
improvements using
CloudFront metrics & logs
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Related breakouts
Tuesday, Nov 27
CTD206 - Broadcasting the World's Largest Sporting Events:
AWS Media Services When It Matters Most
10:45AM – 11:45AM | MGM, Level 3, Premier Ballroom 319
Wednesday, Nov 28
CTD207 - Use Monitoring, Logs, and Analytics Tools to Measure
CDN and Site Performance
5:30PM – 6:30PM | Aria West, Level 3, Starvine 10, Table 6
Thursday, Nov 29
CTD407 - Build Workflows with Amazon CloudFront, Amazon
Route 53, & Lambda@Edge
12:15PM – 1:15PM | MGM, Level 3, North Concourse 307
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Nick Benson
Harrison Clement
Chaitanya Solapurkar
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Contenu connexe

Tendances

Netflix Consulting Project
Netflix Consulting ProjectNetflix Consulting Project
Netflix Consulting Project
Teo Tertel
 

Tendances (20)

Netflix
NetflixNetflix
Netflix
 
Netflix Case Presentation
Netflix Case PresentationNetflix Case Presentation
Netflix Case Presentation
 
Netflix Consulting Project
Netflix Consulting ProjectNetflix Consulting Project
Netflix Consulting Project
 
An Introduction to Amazon AI
An Introduction to Amazon AIAn Introduction to Amazon AI
An Introduction to Amazon AI
 
Netflix business marketpresentation_economics
Netflix business marketpresentation_economicsNetflix business marketpresentation_economics
Netflix business marketpresentation_economics
 
Ott platform
Ott  platformOtt  platform
Ott platform
 
Leveraging the AWS Sales Methodology and Partner Best Practices aws-partner-s...
Leveraging the AWS Sales Methodology and Partner Best Practices aws-partner-s...Leveraging the AWS Sales Methodology and Partner Best Practices aws-partner-s...
Leveraging the AWS Sales Methodology and Partner Best Practices aws-partner-s...
 
Netflix Promotional Campaign
Netflix Promotional CampaignNetflix Promotional Campaign
Netflix Promotional Campaign
 
Cost Optimization on AWS
Cost Optimization on AWSCost Optimization on AWS
Cost Optimization on AWS
 
[NEW LAUNCH!] Introducing Amazon Forecast (AIM344) - AWS re:Invent 2018
[NEW LAUNCH!] Introducing Amazon Forecast  (AIM344) - AWS re:Invent 2018[NEW LAUNCH!] Introducing Amazon Forecast  (AIM344) - AWS re:Invent 2018
[NEW LAUNCH!] Introducing Amazon Forecast (AIM344) - AWS re:Invent 2018
 
Intro to AI & ML at Amazon
Intro to AI & ML at AmazonIntro to AI & ML at Amazon
Intro to AI & ML at Amazon
 
MIS - Final Presentation
MIS - Final PresentationMIS - Final Presentation
MIS - Final Presentation
 
Amazon s3
Amazon s3Amazon s3
Amazon s3
 
Group case study assignment
Group case study assignmentGroup case study assignment
Group case study assignment
 
Netflix Case Study
Netflix Case StudyNetflix Case Study
Netflix Case Study
 
Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017
Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017
Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017
 
Evolving Customer Experience with Amazon Connect, An AI based Contact Centre ...
Evolving Customer Experience with Amazon Connect, An AI based Contact Centre ...Evolving Customer Experience with Amazon Connect, An AI based Contact Centre ...
Evolving Customer Experience with Amazon Connect, An AI based Contact Centre ...
 
Netflix Case Study
Netflix Case StudyNetflix Case Study
Netflix Case Study
 
Netflix
Netflix Netflix
Netflix
 
Module 1 - AWSome Day Online Conference Thailand
Module 1 - AWSome Day Online Conference Thailand Module 1 - AWSome Day Online Conference Thailand
Module 1 - AWSome Day Online Conference Thailand
 

Similaire à Amazon Prime Video: Delivering the Amazing Video Experience (CTD203-R1) - AWS re:Invent 2018

국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
Amazon Web Services Korea
 

Similaire à Amazon Prime Video: Delivering the Amazing Video Experience (CTD203-R1) - AWS re:Invent 2018 (20)

Hollywood's Cloud-Based Content Lakes: Modernized Media Archives (MAE203) - A...
Hollywood's Cloud-Based Content Lakes: Modernized Media Archives (MAE203) - A...Hollywood's Cloud-Based Content Lakes: Modernized Media Archives (MAE203) - A...
Hollywood's Cloud-Based Content Lakes: Modernized Media Archives (MAE203) - A...
 
How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...
How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...
How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...
 
From Russia with Love: Fox Sports World Cup Production (ARC333) - AWS re:Inve...
From Russia with Love: Fox Sports World Cup Production (ARC333) - AWS re:Inve...From Russia with Love: Fox Sports World Cup Production (ARC333) - AWS re:Inve...
From Russia with Love: Fox Sports World Cup Production (ARC333) - AWS re:Inve...
 
High Performance Data Streaming with Amazon Kinesis: Best Practices (ANT322-R...
High Performance Data Streaming with Amazon Kinesis: Best Practices (ANT322-R...High Performance Data Streaming with Amazon Kinesis: Best Practices (ANT322-R...
High Performance Data Streaming with Amazon Kinesis: Best Practices (ANT322-R...
 
Build an AWS Analytics Solution to Monitor the Video Streaming Experience (MA...
Build an AWS Analytics Solution to Monitor the Video Streaming Experience (MA...Build an AWS Analytics Solution to Monitor the Video Streaming Experience (MA...
Build an AWS Analytics Solution to Monitor the Video Streaming Experience (MA...
 
Building and Moving Live Broadcasting to AWS (CTD305) - AWS re:Invent 2018
Building and Moving Live Broadcasting to AWS (CTD305) - AWS re:Invent 2018Building and Moving Live Broadcasting to AWS (CTD305) - AWS re:Invent 2018
Building and Moving Live Broadcasting to AWS (CTD305) - AWS re:Invent 2018
 
Reuters Lives: Scaling & Monitoring Live Video in the Cloud (DEV316-S) - AWS ...
Reuters Lives: Scaling & Monitoring Live Video in the Cloud (DEV316-S) - AWS ...Reuters Lives: Scaling & Monitoring Live Video in the Cloud (DEV316-S) - AWS ...
Reuters Lives: Scaling & Monitoring Live Video in the Cloud (DEV316-S) - AWS ...
 
How Reddit Scales to 1B+ Video Views a Month Using AWS (CTD320) - AWS re:Inve...
How Reddit Scales to 1B+ Video Views a Month Using AWS (CTD320) - AWS re:Inve...How Reddit Scales to 1B+ Video Views a Month Using AWS (CTD320) - AWS re:Inve...
How Reddit Scales to 1B+ Video Views a Month Using AWS (CTD320) - AWS re:Inve...
 
Serverless Video Ingestion & Analytics with Amazon Kinesis Video Streams (ANT...
Serverless Video Ingestion & Analytics with Amazon Kinesis Video Streams (ANT...Serverless Video Ingestion & Analytics with Amazon Kinesis Video Streams (ANT...
Serverless Video Ingestion & Analytics with Amazon Kinesis Video Streams (ANT...
 
Configure an End-to-End Video Channel to Deliver Low Latency (CTD411-R3) - AW...
Configure an End-to-End Video Channel to Deliver Low Latency (CTD411-R3) - AW...Configure an End-to-End Video Channel to Deliver Low Latency (CTD411-R3) - AW...
Configure an End-to-End Video Channel to Deliver Low Latency (CTD411-R3) - AW...
 
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
 
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
 
Tape Is a Four Letter Word: Back Up to the Cloud in Under an Hour (STG201) - ...
Tape Is a Four Letter Word: Back Up to the Cloud in Under an Hour (STG201) - ...Tape Is a Four Letter Word: Back Up to the Cloud in Under an Hour (STG201) - ...
Tape Is a Four Letter Word: Back Up to the Cloud in Under an Hour (STG201) - ...
 
CMP376 - Another Week, Another Million Containers on Amazon EC2
CMP376 - Another Week, Another Million Containers on Amazon EC2CMP376 - Another Week, Another Million Containers on Amazon EC2
CMP376 - Another Week, Another Million Containers on Amazon EC2
 
Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...
Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...
Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...
 
Cost-Effectively Running Distributed Systems at Scale in the Cloud (CMP349) -...
Cost-Effectively Running Distributed Systems at Scale in the Cloud (CMP349) -...Cost-Effectively Running Distributed Systems at Scale in the Cloud (CMP349) -...
Cost-Effectively Running Distributed Systems at Scale in the Cloud (CMP349) -...
 
What’s New for Amazon DynamoDB - 2018 Q1 Update - AWS Online Tech Talks
What’s New for Amazon DynamoDB - 2018 Q1 Update - AWS Online Tech TalksWhat’s New for Amazon DynamoDB - 2018 Q1 Update - AWS Online Tech Talks
What’s New for Amazon DynamoDB - 2018 Q1 Update - AWS Online Tech Talks
 
Operationalizing Machine Learning to Deliver Content at Scale (MAE306) - AWS ...
Operationalizing Machine Learning to Deliver Content at Scale (MAE306) - AWS ...Operationalizing Machine Learning to Deliver Content at Scale (MAE306) - AWS ...
Operationalizing Machine Learning to Deliver Content at Scale (MAE306) - AWS ...
 
Breaking Down the 'Monowhat'
Breaking Down the 'Monowhat'Breaking Down the 'Monowhat'
Breaking Down the 'Monowhat'
 
Building Global Multi-Region, Active-Active Serverless Backends
Building Global Multi-Region, Active-Active Serverless Backends Building Global Multi-Region, Active-Active Serverless Backends
Building Global Multi-Region, Active-Active Serverless Backends
 

Plus de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Amazon Prime Video: Delivering the Amazing Video Experience (CTD203-R1) - AWS re:Invent 2018

  • 1.
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Prime Video: Delivering the Amazing Video Experience C T D 2 0 3 Nick Benson Software Development Manager Amazon Prime Video Harrison Clement Systems Development Engineer Amazon Prime Video Chaitanya Solapurkar Software Development Engineer Amazon CloudFront
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What to expect from the session • Overview of the Prime Video Business Case • Challenges: • Global scale • Large catalog • High traffic • Resource management • Customer satisfaction • Tying it All Together
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prime Video Our Mission: Deliver the best possible video experience to millions of customers across hundreds of different countries. • More than 100 million Prime Customers globally • Available in over 200 countries • Audio Tracks for up to 22 languages • Thousands of different types of devices • 10K+ End-User Networks • Many terabits per second of data streamed to customers • Live and On-Demand Content • Highly variable network infrastructure
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Video Quality Playback Start time Reliability Time Behind Live Prime Video Tradeoffs are important
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prime Video Continuously defining the next rung in the ladder to improve playback customer experience for our customers 2. Measure3. Optimize 1.Deliver
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prime Video traffic impacts the internet • In the Americas, Prime Video generates 7.74%* of all downstream traffic • In the EU, this number is 6.06%* 12:00:00 AM 12:00:00 AM 12:00:00 AM 12:00:00 AM 12:00:00 AM Time in UTC US Traffic Profile (UTC) *https://www.sandvine.com/hubfs/downloads/phenomena/2018-phenomena-report.pdf
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Event forecasting planning High Profile Events like Thursday Night Football and Prime Original releases require accurate forecasting and careful planning 1/1/00 1/11/00 1/21/00 1/31/00 Daily VOD Streams 1/1/1900 3/21/1900 6/9/1900 8/28/1900 11/16/1900 Average Concurrent Streams per Hour Series1 Series2
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prime Video: Protect Amazon resources Reducing Calls to Origin Asset Caching: • Mid-Tier Caching for Live Traffic • Large Cache Width Distribution to reduce Origin Traffic for VOD long tail Prime Video Service Protection: • Cacheable Manifests Customized for Customer, Delivery, and Device Attributes Lambda Use Cases: • Server Side Ad Insertion at the Edge • Dynamic Manifest Thinning and Integration Cached Responses + Stateless Compute Content Requests Origin Mid- Tier POP1 POP2 Mid- Tier POP3 POP4
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon CloudFront global footprint 150 Points of Presence (POP) • 139 Edge locations • 11 Regional Edge Caches • In 65 cities across 29 countries CloudFront Edge locations: • Close to the viewers • Connection termination CloudFront Regional Edge Cache: • Have larger cache width than any individual Edge location • Mid-tier cache between your origin server and globally distributed Edge locations
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. CloudFront traffic management Reaching a POP • Latency-based routing (typically) • Capacity Management • Load Prediction • Flashcrowd handling • Link Aware Routing • DDoS detection and mitigation Edge Locations 8x Traffic Surge during the event Half-time
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. CloudFront traffic management Inside a POP • Load balancing • TLS Encryption and HTTPS • HTTP/2 • Persistent connections • Full and Partial object requests • Collapsed Forwarding • Throttling Request Response Regional Edge CacheEdge location
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prime Video traffic growth on CloudFront 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19… 19…
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Title popularity curve 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 0% 2% 4% 6% 8% 10% 12% Customer Session vs Catalog Distribution
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prime Video: Very large catalog • Title Options through Subscriptions, TVOD, Self-Published Platforms • Each Title Produces Large Set of Encodes • Many Languages • Versions Edited for Territory Compliance • Package Formats: MSS, DASH, HLS, MP4 • Device Capabilities: H.264, HEVC, CVBR, CBR, UHD, HDR10, DolbyHDR • Each Bitrate Separate Encode • Continued growth • Problem: CDNs cannot cache all content on all edges due to limited cache space • Scaling Wide: Cache Optimization • Sharding library by title popularity (optimizing popular content) • Caching the long-tail on CloudFront • Using the Range Header for Partial GETs Catalog shard2 shard3shard1 shard4
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prime Video demand profile on CloudFront • In HTTP Adaptive Streaming, media is requested in discrete chunks and played back • Video players can switch among different: • Bitrates • Languages • Package Formats • Demand curve seen at CloudFront Edge locations is different compared to Title Popularity curve 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% NetworkBytes Disk Bytes
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Improving cacheability on CloudFront • TTL - long-lived v/s short-lived v/s dynamic objects • Reduce variants to improve cacheability • Request Headers • Cookies • Query Strings • Cache Errors – Protect Origin • Customize Error Caching Minimum TTL • CloudFront can deliver stale content if Origin is unreachable • Tune Origin timeouts • Origin Failover Request Response Regional Edge Cache Edge location
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Self-service configuration • Incremental level of complexity • Manual • Incremental level of complexity • Manual  programmatic • Incremental level of complexity • Manual  programmatic  automated
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Rapidly changing business and technology
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prime Video Delivery CloudFront provides self-service rapid configuration Using AWS tools, Prime Video can automatically rapidly deploy distributions to meet business needs Region CloudFormation Resources Client
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prime Video: Protect customer experience Public Internet Fault Mitigation • Enabling Client Failover • CDN Switch, Origin Switch • CDN Selection • Measure CDN performance per segment • Weight CDNs according to segment performance Customer ISP Peering CDN1 CDN2
  • 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Quantifying customer experience • Prime Video measures playback performance to optimize delivery • Metrics are carefully chosen to reflect the customer streaming experience Prime Video Analytics
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Segment Aggregated DataSession Aggregated Input CDN Weights per Segment CDN balancer pipeline Temporal 1 Data Table Temporal 2 Data Table Temporal 3 Data Table CDN Segment Metrics Compute CDN Weight Decision Compute CDN Shifted Weights Data Filtering Temporal 1 Metrics Table Temporal 2 Metrics Table Temporal 3 Metrics Table Load Batched Decisions Write Policy CDN Weights Policy Prime Video Stream Processor Stream Processor Output
  • 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Improving customer experience together Prime Video • Zero Buffer Streams • Concurrent Streams CloudFront: Behind the Scenes • Load balancing improvements • Popular objects • Server load • System tuning • Disk performance • Kernel parameters • Cache Policy Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 95 96 97 98 99 100 ZeroBufferRate ConcurrentStreams PV Re-Buffers on CF vs PV CF Traffic Allocation
  • 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. CloudFront metrics and reports • CloudWatch Metrics • Requests • Bytes Downloaded • Bytes Uploaded • Total Error Rate • 4xx • 5xx • Reports • Usage • Requests • Bytes • Popular Objects • HTTP Status Codes
  • 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Querying CloudFront logs using Amazon Athena SELECT COUNT(*) AS ct, uri FROM cloudfront_logs_2 WHERE status > 500 GROUP BY uri ORDER BY ct DESC; SELECT COUNT(*) AS ct, requestip FROM cloudfront_logs_2 WHERE status = 404 GROUP BY requestip ORDER BY ct DESC; #Fields: date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status cs(Referer) cs(User-Agent) cs-uri-query cs(Cookie) x-edge-result-type x-edge-request-id x- host-header cs-protocol cs-bytes time-taken x-forwarded-for ssl-protocol ssl-cipher x- edge-response-result-type cs-protocol-version fle-status fle-encrypted-fields 2018-09-13 09:21:31 CDG54 458 212.84.57.66 GET d3i3qsqe3g3tmp.cloudfront.net /dash/9097/5acf3fa84056f.mpd 304 http://videos.example.com/dash/9097/5acf3fa84056f.mpd Mozilla/5.0%2520(Windows%2520NT%25206.1;%2520Win64;%2520x64)%2520AppleWebKit/537.36%2520(K HTML,%2520like%2520Gecko)%2520Chrome/65.0.3325.181%2520Safari/537.36 - - Hit O_7sNozG9s9NPrg3W8y_K55uXA45TBBxe-JCLPUQ_kTjfAtfpu_-Pg== videos.example.com https 329 0.024 - TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 Hit HTTP/2.0 - - Amazon CloudFront Access Logs Amazon S3
  • 31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Key takeaways • Forecasting and planning help with traffic scaling • Understand catalog demands • Adapt AWS tools to your development lifecycle • Drive Customer Experience improvements using CloudFront metrics & logs
  • 33. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Related breakouts Tuesday, Nov 27 CTD206 - Broadcasting the World's Largest Sporting Events: AWS Media Services When It Matters Most 10:45AM – 11:45AM | MGM, Level 3, Premier Ballroom 319 Wednesday, Nov 28 CTD207 - Use Monitoring, Logs, and Analytics Tools to Measure CDN and Site Performance 5:30PM – 6:30PM | Aria West, Level 3, Starvine 10, Table 6 Thursday, Nov 29 CTD407 - Build Workflows with Amazon CloudFront, Amazon Route 53, & Lambda@Edge 12:15PM – 1:15PM | MGM, Level 3, North Concourse 307
  • 34. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Nick Benson Harrison Clement Chaitanya Solapurkar
  • 35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.