Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ライブ視聴を支える配信基盤の話をざっくりと / livestreaming-dogenzak...
Search
Taro Hirose
October 19, 2016
Technology
2
1.5k
ライブ視聴を支える配信基盤の話をざっくりと / livestreaming-dogenzakabeerbash
道玄坂BeerBash#2 秋のLT収穫祭
「ライブ視聴を支える配信基盤の話をざっくりと」
http://dogenzaka-beerbash.connpass.com/event/39352/
Taro Hirose
October 19, 2016
Tweet
Share
More Decks by Taro Hirose
See All by Taro Hirose
令和の時代におけるライブ動画サービスの作り方 / How to build your Live video streaming service in Reiwa era
uorat
0
83
Amazon IVS ROCKS!
uorat
1
310
ECS Events & Lambda でカジュアルにはじめるコンテナスケジューラー / 20171212_jawsug-container-lt
uorat
2
1.3k
OPENREC.tv におけるライブ動画およびメッセージ配信基盤の全貌 / 20170601_aws_devday_tokyo_openrec
uorat
4
4.8k
AWS re:Invent 2016 参加レポート / reinvent2016_report
uorat
0
1.9k
構成管理ツール Ansible 実践 / ansible-seminar-20160715
uorat
0
1k
ライブ視聴を支えるリアルタイムメッセージ配信基盤の話 / GunosyBeerBash #6
uorat
0
4.3k
Ansible 入門 #01 (初心者向け) / ansible-entry
uorat
1
190
Other Decks in Technology
See All in Technology
reinvent2024を起点に振り返るサーバーレスアップデート
mihonda
1
170
Skip Skip Run Run Run ♫
temoki
0
320
Site Reliability Engineering on Kubernetes
nwiizo
6
3.7k
Redmineの意外と知らない便利機能 (Redmine 6.0対応版)
vividtone
0
140
HCP TerraformとAzure:イオンスマートテクノロジーのインフラ革新 / HCP Terraform and Azure AEON Smart Technology's Infrastructure Innovation
aeonpeople
3
840
攻撃者の視点で社内リソースはどう見えるのかを ASMで実現する
hikaruegashira
3
1.8k
SREKaigi.pdf
_awache
2
3.1k
第27回クラウド女子会 ~re:Invent 振り返りLT会~ 宣言型ポリシー、使ってみたらこうだった!
itkr2305
0
270
GDG Tokyo 生成 AI 論文をわいわい読む会
enakai00
0
250
一人から始めたSREチーム3年の歩み - 求められるスキルの変化とチームのあり方 - / The three-year journey of the SRE team, which started all by myself
vtryo
7
4.9k
第27回クラウド女子会 ~re:Invent 振り返りLT会~ 私の周辺で反響のあった re:Invent 2024 アップデートつれづれ/reinvent-2024-update-reverberated-around-me
emiki
1
560
サーバレスの未来〜The Key to Simplifying Everything〜
kawaji_scratch
2
330
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
182
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
39
1.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
We Have a Design System, Now What?
morganepeng
51
7.4k
RailsConf 2023
tenderlove
29
980
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Documentation Writing (for coders)
carmenintech
67
4.6k
Side Projects
sachag
452
42k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
Transcript
ϥΠϒࢹௌΛࢧ͑Δ ৴ج൫ͷΛ ͬ͘͟Γͱ
ࣗݾհ ኍ ଠ @ CyberZ ▸ OPENRECࣄۀ෦ ▸ Πϯϑϥ &
αʔόαΠυΤϯδχΞ ▸ લ৬: IT Consulting Firm / SIer ▸ ಘҙྖҬ: ߏཧ/ࣗಈԽ, ࢹ ▸ Twitter: @uorat ▸ Blog: http://uorat.hatenablog.com/
OPENREC.tv ήʔϜʹಛԽͨ͠ಈը৴αʔϏε https://www.openrec.tv/ ϓϨΠಈըͷߘɺϥΠϒ৴ / ॴҦe-sportsࢢ 3
OPENREC.tv ৴ྫ: Shadowverse 4
ຊͷ༰ ͜ͷ෦ 5
Live Streaming ಈը৴ج൫
ϥΠϒ৴ͷجຊ ετϦʔϛϯά৴ ▸ ϑΝΠϧͷμϯϩʔυΛඇಉظͰ ߦ͍ͳ͕Βɺಈըͷ࠶ੜΛߦ͏ ▸ ܰྔͳϑΝΠϧΛ৴͢Δ͜ͱͰɺ࠶ੜ· ͰͷͪΛ͘͢Δ ▸ ΦϯσϚϯυϥΠϒجຊతʹετϦʔ
ϛϯάͰ৴͢Δͷ͕σϑΝΫτ ▸ ख๏ʢϓϩτίϧʣ৭ʑ ▸ ϥΠϒ৴ͷ؊ ▸ มͱ৴ʹཁ͢Δ࣌ؒͷॖ ▸ ෛՙରࡦ
ϥΠϒ৴ͷجຊ RTMP ▸ AdobeʹΑΓ։ൃ͞ΕͨFlash Video༻ͷετϦʔϛϯάϓϩτ ίϧ ▸ ࣋ଓଓͰಈըσʔλΛ৴͢Δ ͨΊɺҰൠతʹEdgeΛେྔʹ ༻ҙ͢Δඞཁ͕͋Δ
▸ Statelessͳ௨৴Ͱͳ͍ͨΊ৴ଆ ͷScaling͕େมɺඅ༻͔͔Δ ▸ ࠶ੜʹFlash Player͕ඞཁ
ϥΠϒ৴ͷجຊ HLS (HTTP Live Streaming) ▸ AppleʹΑΓ։ൃ͞ΕͨHTTP ϕʔεͷετϦʔϛϯάϓϩτ ίϧ ▸
ಈըσʔλΛඵʙॏඵͷϑΝ Πϧʹׂ͠ஞ࣍Download͠ ͯ࠶ੜ͢Δ ▸ HTTPͷԸܙΛڗडͰ͖Δ ▸ ಛघͳPlayerෆཁ ▸ Caching͍͢͠ ▸ Scaling͍͢͠
ϥΠϒ৴ͷجຊ HLSͳϥΠϒ৴γεςϜྫ ▸ ਤΛషΓ͚Δ
Live Streaming ߏհ
͏ͪͷετϦʔϛϯάᶃ CloudFront + Wowza Streaming Engine + ElasticTranscoder ▸ ਤΛషΓ͚Δ
͏ͪͷετϦʔϛϯάᶃ ϙΠϯτ: ʮ͋͑ͯʯAWSʹ࠷దԽ ▸ CloudFrontʹΑΔHLS৴ͷলΤωԽ ▸ CacheઓུʹΑΔOriginαʔόͷෛՙݮ ▸ EC2 +
CloudFrontͷΈ߹ΘͤʹΑΔԸܙ ▸ CDN Edge - OriginؒͷLatency࠷খԽ ▸ Origin → CDN Edgeؒͷσʔλసૹૹ৴ྉ Free ▸ GPUΠϯελϯεͷ׆༻ ▸ EC2 API ʹΑΔෛՙʹԠ֦ͨ͡ுॖୀ੍ޚ
Messaging νϟοτ
νϟοτͷجຊ ۭؒڞ༗ ▸ ؍ઓ࣌ͷྟײΛΦϯϥΠϯͰମݧ ▸ ྫ: RAGE ▸ ίϛϡχέʔγϣϯखஈ ▸
ϓϨΠϠʔɿࢹௌऀ ▸ ࢹௌऀɿࢹௌऀ ▸ ྫ: ϚΠϯΫϥϑτ ग़య: http://tappli.org/column-detail.php?id=1166
νϟοτͷجຊ ࣄྫ: Minecraft
νϟοτͷجຊ ϦΞϧλΠϜϝοηʔδ৴ج൫ ▸ ϦΞϧλΠϜ ▸ Ԇ = e-sportsಛ༗ͷྟײΛڞ༗Ͱ͖ͳ͍ ▸ ৴ऀɿࢹௌऀؒͷରखஈͰ͋Δ
▸ શࢹௌऀʹରͯ͠Ұ੪ʹϝοηʔδ৴͢Δඞཁ͋Γ ▸ ߴ֦ுੑ ▸ ಉ࣌ࢹௌऀ͕૿͑ͯεέʔϧΞτͰ͖Δ ▸ ਓؾ৴ສਓҎ্ͷϢʔβ͕ࢹௌ͢Δ ▸ ෳ৴͋Γɺ৴ʹूத͢Δ ▸ ࢹௌऀ͕ेສ, ඦສਓͱ૿͑ͯϝοηʔδ৴ʹࢧো Λ͖ͨ͞ͳ͍͜ͱ
ࠓ 2िؒͰ࡞ͬͨνϟοτج൫ ▸ Node.js + Socket.IOϕʔεͷ WebSocketΞϓϦέʔγϣϯ ▸ MessageHubʹRedis (Pub/Sub)
▸ ELB(Classic) ͕WebSocketඇରԠͷ ͨΊɺΞϓϦέʔγϣϯଆͰόϥϯ γϯάॲཧ࣮
ࠓ 2िؒͰ࡞ͬͨνϟοτج൫ ▸ Node.js + Socket.IOϕʔεͷ WebSocketΞϓϦέʔγϣϯ ▸ MessageHubʹRedis (Pub/Sub)
▸ ELB(Classic) ͕WebSocketඇରԠͷ ͨΊɺΞϓϦέʔγϣϯଆͰόϥϯ γϯάॲཧ࣮
None
Messaging 改
͏ͪͷετϦʔϛϯάᶄ ઈࢍϦϓϨʔεத
͏ͪͷετϦʔϛϯάᶄ ઈࢍϦϓϨʔεத ▸ WebSocketରԠͨ͠ELB - ALBΛಋೖ ▸ ϑϧϚωʔδυʹΑΔӡ༻ෛՙݮΛૂ͏ ▸ Nginx
+ SerfͰྑ͍Μ͚ͩͲ ▸ Content-Based RoutingΛ׆༻ͨ͠खܰͳγϟʔσΟϯά ▸ ͦͷଞॾʑͷϝεೖΕ ▸ Node.js / Socket.IO version up ▸ AutoScaling
Summary ·ͱΊ
·ͱΊ ϓϥοτϑΥʔϜ࠷దԽ ≠ ϩοΫΠϯ ▸ ʮ͋͑ͯʯͦ͜ʹ࠷దԽ͢Δ͜ͱͰੜ·ΕΔϝϦοτ͋Δ ▸ අ༻ ▸ ӡ༻༰қੑ
▸ ϨΠςϯγ ▸ γϯϓϧ ▸ దࡐదॴͳٕज़࠾ͱઃܭ େࣄ ▸ ϑϧϚωʔδυ or ࣗྗ࣮ ▸ େࣄͳ͜ͱ ϏδωεඪΛୡ͢ΔͨΊͷಓےΛඳ͘͜ͱ ▸ εϐʔυ ▸ ίετ
ࠂ RAGE vol.3 Shadowverse ▸ ༧બ: 2016/10/22 () - 10/23
() ▸ ܾউ (GRAND FINAL): 2016/11/23 (ਫɾॕ) https://rage-esports.jp/