SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
Globo.com’s Live
Video Platform
for FIFA World Cup 14
09/23/15
#nginx #nginxconf
an amazing teamwork
Leandro
Moreira
other teamsDaniel
Martins
Flávio
Ribeiro
Juarez
Bochi
Hugo
Roque
Robson
Soares
Rafael
Borsani
Bernardo
Camilo
Lucas
Mundim
Juan
Almeida
more people
streaming rights for Brazil only
Agenda (4+ years of work)
2010 Architecture for FIFA World Cup 10
2012 Mobile support
2013 HLS adoption
2014 DVR
2014 Waiting room
2014 FIFA World Cup results
2015 Recap & Next steps
architecture in 2010
#nginx #nginxconf
{2010} in the beginning
encoderh264+aacrtmptcp
h264+aacrtmptcp
flash player
firewall
1935
1º
2º3º
4º
RTMP
{2010} good part
small delay (2-5s)
{2010} issue :: instrumentation
tail -f
kill -9
ps aux
{2010} issue :: scalability
$$$$$
{2010} issue :: scalability
{2010} some data from FIFA10
● ~= 285k simult. users *
● max bitrate 800 Kbps
*peak
mobile support
#nginx #nginxconf
{2012} and then multi-devices...
hls
h264+aacrtmptcp
h264+aacrtmptcp
h264+aacrtmptcp
hls
{2012} how does HLS work?
seg1.ts
seg2.ts
seg3.ts
seg4.ts
240p.m3u8
480p.m3u8
720p.m3u8
seg1.ts
seg2.ts
seg3.ts
seg4.ts
seg1.ts
seg2.ts
seg3.ts
seg4.ts
1 - GET /variant.m3u8 (text)
2 - GET /720p.m3u8 (text)
240p.m3u8
variant.m3u8
480p.m3u8 720p.m3u8
3 - GET /seg3.ts (video)
4 - GET /seg4.ts (video)
5 - GET /720p.m3u8 (text)
6 - GET /seg5.ts (video)
7 - GET /seg6.ts (video)
8 - ...
http
http
seg3.ts
seg4.ts
seg5.ts
seg6.ts
seg3.ts
seg4.ts
seg5.ts
seg6.ts
seg3.ts
seg4.ts
seg5.ts
seg6.ts
{2012} first hls solution
encoderh264+aacrtmptcp
h264+aachttptcp
flash player
2º3º
5º
4º
android
ios
1º
HTTP
{2012} generation and distribution
rtmp
video
playlists
files
location ~ /hls {
root "/vol/hls/";
}
dest = "/vol/hls";
http
BEFE segmenter
{2012} first solution architecture
BEFE LB SELB LB
auth & cache mostly cache hls generation
upstream upstream
http
HLS adoption
#nginx #nginxconf
{2012} one protocol to rule them all
{2013} buffering hls x rtmp
6x less buffering with HLS
{2013} instrumentation
Graphite
● status code
● request t.
● cache hit
● cpu usage
● memory
● buffer rate
● bitrate
time-series data
graph api
http
enqueue
dequeuemetric x t
snmp
metric x t
agents
{2013} sauron
Graphite
{2014} caching configuration
don’t forget to: proxy_cache_use_stale updating
011011100
110011101
101001011
011100111
1000
video0.ts
video0.ts expired
UPDATING
FE BE
proxy_cache_lock
{2014} OS fine tuning
{2014} OS fine tuning
19Gpbs maxconn: 70k, cpu affinity
15Gpbs maxconn: 40k, cpu affinity
12Gpbs maxconn: 25k, irqbalance
packet loss
4Gbps, no fine tuning
*each machine has 2 NIC bonded (10GB each one)
{2014} what we’ve got here is
Scalabilityport:80 UX Instrumentation
2G
4G
Wifi
1080p
720p
320p
Caching
{2014} farm size
FE: 80 nodes
24 cores 64 GB 1TB
10 Gbps 10 Gbps
BE: 6 nodes
SE: 2 nodes
DVR
#nginx #nginxconf
FIFA 2014 World Cup Brasil
{2014} what is DVR for hls?
/720p.m3u8
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:5,
seg1.ts
#EXTINF:5,
seg2.ts
#EXTINF:5,
seg3.ts
/720p.m3u8
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:5,
seg1.ts
#EXTINF:5,
seg2.ts
#EXTINF:5,
seg3.ts
#EXTINF:5,
seg4.ts
#EXTINF:5,
seg5.ts
#EXTINF:5,
seg6.ts
#EXTINF:5,
seg7.ts
#EXTINF:5,
seg8.ts
#EXTINF:5,
seg9.ts
#EXTINF:5,
seg10.ts
ingest
{2014} reviewing current solution
frontend
encoderh264+aacrtmptcp
h264+aachttptcp
flash player
2º3º
5º
4º
android
ios
1º
{2014} dvr challenges :: failover
didn’t have a failover option for DVR
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:10
#EXTINF:5,
seg10.ts
#EXTINF:5,
seg11.ts
#EXTINF:5,
seg12.ts
#EXTINF:5,
seg13.ts
#EXTINF:5,
seg14.ts
#EXTINF:5,
seg15.ts
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:5,
seg1.ts
{2014} dvr challenges :: storage
2h * 60m * 60s / 5s * 4.5mb ~= 6.4GB
}1.6MB 1.1MB 0.8MB 0.5MB 0.3MB 0.1MB
4.5MB
per 5s
2 games + 4 other streams ~= 38.4GB
02:00:0000:00:00
{2014} redis as a datastore
ingest
embed-script: fetch and serve hls
frontend
daemon: mon file change and save hls
{2014} Brazil’s general election
too many simultaneous live streams
{2014} from redis to cassandra
ingest
embed-script: fetch and serve hls
frontend
daemon: mon file change and save hls
waiting room
#nginx #nginxconf
{2014} multihoming (anycast)
ISPx
ISPy
ISPk
SPBGP announcement
186.192.81.0/24
ISPx ISPy
ISPk
RJ
186.192.81.2
BGP announcement
186.192.81.0/24
PoP
PoP
{2014} user’s bandwidth
ISP X
ISP Y
20Gbps
5Gbps
IXP
ISP K
80Gbps
8Gbps
FIFA World Cup 2014 results
#nginx #nginxconf
FIFA 2014 World Cup results
FIFA 2014 World Cup Brazil data
● > 500k simult. users (peak 1 game)
● ~= 125.000 video req/s (peak 1 game)
● > 640 Gbps (peak 1 game)
FIFA 2014 World Cup Brazil data
FIFA 2014 World Cup Brazil data
● ~= 1600 watched years (sum all)
● > 40M video views (sum all)
● ~= avg 6 Gbps, max 19 Gbps
● ~= cpu usage max 10% (per node, FE)
● ~= avg bitrate 480 Kbps (crowded)
● ~= avg bitrate 1864 Kbps (less crowded)
FIFA 2014 World Cup Brazil data
Recap and next steps
#nginx #nginxconf
● video streaming:
○ delivery and caching
○ geolocation (geofencing)
○ authorization / authentication
● microservices
○ playlist generation
○ waiting room
○ streams per account locking system
Nginx usage
is amazing
Lua was made in Brazil :)
TDD with busted
easier to develop
performance near C (lang)
OSS from this history
m3u8 parser
cassandra
driver
clappr
evostream
api
live_thumb
nginx-audio-track-module
BemTV
iprange
summary and future
2010
FIFA
2012
BBB
2014
FIFA
Elections
● hls
● http
● flash
● rtmp
● hls
● http
● dvr
2016
Olympic
Games
● dash ???
● ingest ???
● 4k ???
Questions?
THANK YOU!
leandromoreira.com.br
jbochi.me

Contenu connexe

Tendances

Brightcove live tech overview
Brightcove live tech overviewBrightcove live tech overview
Brightcove live tech overviewJordi Cenzano
 
Undo tech overview_201410
Undo tech overview_201410Undo tech overview_201410
Undo tech overview_201410gregthelaw
 
KDE Plasma Develop Intro
KDE Plasma Develop IntroKDE Plasma Develop Intro
KDE Plasma Develop Introcsslayer
 
Drupal hhvm benchmark
Drupal hhvm benchmarkDrupal hhvm benchmark
Drupal hhvm benchmarkLe Thanh Sang
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18Xiaoli Liang
 
OVHcloud TechTalks - ML serving
OVHcloud TechTalks - ML servingOVHcloud TechTalks - ML serving
OVHcloud TechTalks - ML servingOVHcloud
 

Tendances (8)

How we do python
How we do pythonHow we do python
How we do python
 
Brightcove live tech overview
Brightcove live tech overviewBrightcove live tech overview
Brightcove live tech overview
 
Undo tech overview_201410
Undo tech overview_201410Undo tech overview_201410
Undo tech overview_201410
 
Readme
ReadmeReadme
Readme
 
KDE Plasma Develop Intro
KDE Plasma Develop IntroKDE Plasma Develop Intro
KDE Plasma Develop Intro
 
Drupal hhvm benchmark
Drupal hhvm benchmarkDrupal hhvm benchmark
Drupal hhvm benchmark
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18
 
OVHcloud TechTalks - ML serving
OVHcloud TechTalks - ML servingOVHcloud TechTalks - ML serving
OVHcloud TechTalks - ML serving
 

Similaire à nginx.conf - globo.com's live video platform for fifa world cup 14

Video and DICOM: Today and future
Video and DICOM: Today and futureVideo and DICOM: Today and future
Video and DICOM: Today and futureIRT b-com
 
Introduction to Transcoding: Tools and Processes
Introduction to Transcoding: Tools and ProcessesIntroduction to Transcoding: Tools and Processes
Introduction to Transcoding: Tools and ProcessesPrestoCentre
 
Hikvision 6467 dm device
Hikvision 6467 dm deviceHikvision 6467 dm device
Hikvision 6467 dm deviceBenjie Fabro
 
Secrets to Optimizing Your Live Ops | Scott Humphries
Secrets to Optimizing Your Live Ops | Scott HumphriesSecrets to Optimizing Your Live Ops | Scott Humphries
Secrets to Optimizing Your Live Ops | Scott HumphriesJessica Tams
 
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...Yusuke Goto
 
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7Shuo LI
 
Sony PXW-X500 Camcorder
Sony PXW-X500 CamcorderSony PXW-X500 Camcorder
Sony PXW-X500 CamcorderAV ProfShop
 
Intel Inside–Amazing Experience Outside
Intel Inside–Amazing Experience OutsideIntel Inside–Amazing Experience Outside
Intel Inside–Amazing Experience OutsideDell_Russia
 
Escolhendo o Processador DaVinciTM para sua Aplicação de ...
Escolhendo o Processador DaVinciTM para sua Aplicação de ...Escolhendo o Processador DaVinciTM para sua Aplicação de ...
Escolhendo o Processador DaVinciTM para sua Aplicação de ...Videoguy
 
Escolhendo o Processador DaVinciTM para sua Aplicação de ...
Escolhendo o Processador DaVinciTM para sua Aplicação de ...Escolhendo o Processador DaVinciTM para sua Aplicação de ...
Escolhendo o Processador DaVinciTM para sua Aplicação de ...Videoguy
 
H 264 Pc Based Dvr
H 264 Pc Based DvrH 264 Pc Based Dvr
H 264 Pc Based Dvrandy
 
H 264 Pc Based Dvr
H 264 Pc Based DvrH 264 Pc Based Dvr
H 264 Pc Based Dvrandy
 
H 264 Pc Based Dvr
H 264 Pc Based DvrH 264 Pc Based Dvr
H 264 Pc Based Dvrandy
 
DIGIEVER NVR Pro+_DS-16300-RM Pro+ _ CCTV _ Network Video Recording _ Linux _...
DIGIEVER NVR Pro+_DS-16300-RM Pro+ _ CCTV _ Network Video Recording _ Linux _...DIGIEVER NVR Pro+_DS-16300-RM Pro+ _ CCTV _ Network Video Recording _ Linux _...
DIGIEVER NVR Pro+_DS-16300-RM Pro+ _ CCTV _ Network Video Recording _ Linux _...Ali Shoaee
 
Streaming Media West 2017 - HTML5 Workshop
Streaming Media West 2017 - HTML5 WorkshopStreaming Media West 2017 - HTML5 Workshop
Streaming Media West 2017 - HTML5 WorkshopErica Beavers
 
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON
 

Similaire à nginx.conf - globo.com's live video platform for fifa world cup 14 (20)

Video and DICOM: Today and future
Video and DICOM: Today and futureVideo and DICOM: Today and future
Video and DICOM: Today and future
 
Introduction to Transcoding: Tools and Processes
Introduction to Transcoding: Tools and ProcessesIntroduction to Transcoding: Tools and Processes
Introduction to Transcoding: Tools and Processes
 
Hikvision 6467 dm device
Hikvision 6467 dm deviceHikvision 6467 dm device
Hikvision 6467 dm device
 
Secrets to Optimizing Your Live Ops | Scott Humphries
Secrets to Optimizing Your Live Ops | Scott HumphriesSecrets to Optimizing Your Live Ops | Scott Humphries
Secrets to Optimizing Your Live Ops | Scott Humphries
 
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
 
G
GG
G
 
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
 
Dvr studio
Dvr studioDvr studio
Dvr studio
 
Sony PXW-X500 Camcorder
Sony PXW-X500 CamcorderSony PXW-X500 Camcorder
Sony PXW-X500 Camcorder
 
Intel Inside–Amazing Experience Outside
Intel Inside–Amazing Experience OutsideIntel Inside–Amazing Experience Outside
Intel Inside–Amazing Experience Outside
 
Escolhendo o Processador DaVinciTM para sua Aplicação de ...
Escolhendo o Processador DaVinciTM para sua Aplicação de ...Escolhendo o Processador DaVinciTM para sua Aplicação de ...
Escolhendo o Processador DaVinciTM para sua Aplicação de ...
 
Escolhendo o Processador DaVinciTM para sua Aplicação de ...
Escolhendo o Processador DaVinciTM para sua Aplicação de ...Escolhendo o Processador DaVinciTM para sua Aplicação de ...
Escolhendo o Processador DaVinciTM para sua Aplicação de ...
 
Parallel HDF5
Parallel HDF5Parallel HDF5
Parallel HDF5
 
H 264 Pc Based Dvr
H 264 Pc Based DvrH 264 Pc Based Dvr
H 264 Pc Based Dvr
 
H 264 Pc Based Dvr
H 264 Pc Based DvrH 264 Pc Based Dvr
H 264 Pc Based Dvr
 
H 264 Pc Based Dvr
H 264 Pc Based DvrH 264 Pc Based Dvr
H 264 Pc Based Dvr
 
DIGIEVER NVR Pro+_DS-16300-RM Pro+ _ CCTV _ Network Video Recording _ Linux _...
DIGIEVER NVR Pro+_DS-16300-RM Pro+ _ CCTV _ Network Video Recording _ Linux _...DIGIEVER NVR Pro+_DS-16300-RM Pro+ _ CCTV _ Network Video Recording _ Linux _...
DIGIEVER NVR Pro+_DS-16300-RM Pro+ _ CCTV _ Network Video Recording _ Linux _...
 
Streaming Media West 2017 - HTML5 Workshop
Streaming Media West 2017 - HTML5 WorkshopStreaming Media West 2017 - HTML5 Workshop
Streaming Media West 2017 - HTML5 Workshop
 
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
 
2017 LTS catalogue
2017 LTS catalogue2017 LTS catalogue
2017 LTS catalogue
 

Dernier

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...SUHANI PANDEY
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...SUHANI PANDEY
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubaikojalkojal131
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...nirzagarg
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋nirzagarg
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...tanu pandey
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdfMatthew Sinclair
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...roncy bisnoi
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...nilamkumrai
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...nilamkumrai
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...SUHANI PANDEY
 

Dernier (20)

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 

nginx.conf - globo.com's live video platform for fifa world cup 14

  • 1. Globo.com’s Live Video Platform for FIFA World Cup 14 09/23/15 #nginx #nginxconf
  • 2. an amazing teamwork Leandro Moreira other teamsDaniel Martins Flávio Ribeiro Juarez Bochi Hugo Roque Robson Soares Rafael Borsani Bernardo Camilo Lucas Mundim Juan Almeida more people
  • 3.
  • 4. streaming rights for Brazil only
  • 5. Agenda (4+ years of work) 2010 Architecture for FIFA World Cup 10 2012 Mobile support 2013 HLS adoption 2014 DVR 2014 Waiting room 2014 FIFA World Cup results 2015 Recap & Next steps
  • 7. {2010} in the beginning encoderh264+aacrtmptcp h264+aacrtmptcp flash player firewall 1935 1º 2º3º 4º RTMP
  • 8. {2010} good part small delay (2-5s)
  • 9. {2010} issue :: instrumentation tail -f kill -9 ps aux
  • 10. {2010} issue :: scalability $$$$$
  • 11. {2010} issue :: scalability
  • 12. {2010} some data from FIFA10 ● ~= 285k simult. users * ● max bitrate 800 Kbps *peak
  • 14. {2012} and then multi-devices... hls h264+aacrtmptcp h264+aacrtmptcp h264+aacrtmptcp hls
  • 15. {2012} how does HLS work? seg1.ts seg2.ts seg3.ts seg4.ts 240p.m3u8 480p.m3u8 720p.m3u8 seg1.ts seg2.ts seg3.ts seg4.ts seg1.ts seg2.ts seg3.ts seg4.ts 1 - GET /variant.m3u8 (text) 2 - GET /720p.m3u8 (text) 240p.m3u8 variant.m3u8 480p.m3u8 720p.m3u8 3 - GET /seg3.ts (video) 4 - GET /seg4.ts (video) 5 - GET /720p.m3u8 (text) 6 - GET /seg5.ts (video) 7 - GET /seg6.ts (video) 8 - ... http http seg3.ts seg4.ts seg5.ts seg6.ts seg3.ts seg4.ts seg5.ts seg6.ts seg3.ts seg4.ts seg5.ts seg6.ts
  • 16. {2012} first hls solution encoderh264+aacrtmptcp h264+aachttptcp flash player 2º3º 5º 4º android ios 1º HTTP
  • 17. {2012} generation and distribution rtmp video playlists files location ~ /hls { root "/vol/hls/"; } dest = "/vol/hls"; http BEFE segmenter
  • 18. {2012} first solution architecture BEFE LB SELB LB auth & cache mostly cache hls generation upstream upstream http
  • 20. {2012} one protocol to rule them all
  • 21. {2013} buffering hls x rtmp 6x less buffering with HLS
  • 22. {2013} instrumentation Graphite ● status code ● request t. ● cache hit ● cpu usage ● memory ● buffer rate ● bitrate time-series data graph api http enqueue dequeuemetric x t snmp metric x t agents
  • 24. {2014} caching configuration don’t forget to: proxy_cache_use_stale updating 011011100 110011101 101001011 011100111 1000 video0.ts video0.ts expired UPDATING FE BE proxy_cache_lock
  • 25. {2014} OS fine tuning
  • 26. {2014} OS fine tuning 19Gpbs maxconn: 70k, cpu affinity 15Gpbs maxconn: 40k, cpu affinity 12Gpbs maxconn: 25k, irqbalance packet loss 4Gbps, no fine tuning *each machine has 2 NIC bonded (10GB each one)
  • 27. {2014} what we’ve got here is Scalabilityport:80 UX Instrumentation 2G 4G Wifi 1080p 720p 320p Caching
  • 28. {2014} farm size FE: 80 nodes 24 cores 64 GB 1TB 10 Gbps 10 Gbps BE: 6 nodes SE: 2 nodes
  • 30. FIFA 2014 World Cup Brasil
  • 31. {2014} what is DVR for hls? /720p.m3u8 #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:1 #EXTINF:5, seg1.ts #EXTINF:5, seg2.ts #EXTINF:5, seg3.ts /720p.m3u8 #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:1 #EXTINF:5, seg1.ts #EXTINF:5, seg2.ts #EXTINF:5, seg3.ts #EXTINF:5, seg4.ts #EXTINF:5, seg5.ts #EXTINF:5, seg6.ts #EXTINF:5, seg7.ts #EXTINF:5, seg8.ts #EXTINF:5, seg9.ts #EXTINF:5, seg10.ts
  • 32. ingest {2014} reviewing current solution frontend encoderh264+aacrtmptcp h264+aachttptcp flash player 2º3º 5º 4º android ios 1º
  • 33. {2014} dvr challenges :: failover didn’t have a failover option for DVR #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:10 #EXTINF:5, seg10.ts #EXTINF:5, seg11.ts #EXTINF:5, seg12.ts #EXTINF:5, seg13.ts #EXTINF:5, seg14.ts #EXTINF:5, seg15.ts #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:1 #EXTINF:5, seg1.ts
  • 34. {2014} dvr challenges :: storage 2h * 60m * 60s / 5s * 4.5mb ~= 6.4GB }1.6MB 1.1MB 0.8MB 0.5MB 0.3MB 0.1MB 4.5MB per 5s 2 games + 4 other streams ~= 38.4GB 02:00:0000:00:00
  • 35. {2014} redis as a datastore ingest embed-script: fetch and serve hls frontend daemon: mon file change and save hls
  • 36. {2014} Brazil’s general election too many simultaneous live streams
  • 37. {2014} from redis to cassandra ingest embed-script: fetch and serve hls frontend daemon: mon file change and save hls
  • 39. {2014} multihoming (anycast) ISPx ISPy ISPk SPBGP announcement 186.192.81.0/24 ISPx ISPy ISPk RJ 186.192.81.2 BGP announcement 186.192.81.0/24 PoP PoP
  • 40. {2014} user’s bandwidth ISP X ISP Y 20Gbps 5Gbps IXP ISP K 80Gbps 8Gbps
  • 41.
  • 42. FIFA World Cup 2014 results #nginx #nginxconf
  • 43. FIFA 2014 World Cup results
  • 44. FIFA 2014 World Cup Brazil data
  • 45. ● > 500k simult. users (peak 1 game) ● ~= 125.000 video req/s (peak 1 game) ● > 640 Gbps (peak 1 game) FIFA 2014 World Cup Brazil data
  • 46. FIFA 2014 World Cup Brazil data ● ~= 1600 watched years (sum all) ● > 40M video views (sum all) ● ~= avg 6 Gbps, max 19 Gbps
  • 47. ● ~= cpu usage max 10% (per node, FE) ● ~= avg bitrate 480 Kbps (crowded) ● ~= avg bitrate 1864 Kbps (less crowded) FIFA 2014 World Cup Brazil data
  • 48. Recap and next steps #nginx #nginxconf
  • 49. ● video streaming: ○ delivery and caching ○ geolocation (geofencing) ○ authorization / authentication ● microservices ○ playlist generation ○ waiting room ○ streams per account locking system Nginx usage
  • 50. is amazing Lua was made in Brazil :) TDD with busted easier to develop performance near C (lang)
  • 51. OSS from this history m3u8 parser cassandra driver clappr evostream api live_thumb nginx-audio-track-module BemTV iprange
  • 52. summary and future 2010 FIFA 2012 BBB 2014 FIFA Elections ● hls ● http ● flash ● rtmp ● hls ● http ● dvr 2016 Olympic Games ● dash ??? ● ingest ??? ● 4k ???