Mais conteúdo relacionado Semelhante a Putting WebRTC Media in the Cloud (20) Mais de Dialogic Inc. (6) Putting WebRTC Media in the Cloud1. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
WebRTCMedia in the Cloud
Chad Hart
IIT RTC Conference 2014 2. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
2
Why do you need a media server?
Multi-party conferencing
Interworking
Transcoding
Stream processing
Person-to-machine
Recording 4. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
4
Bandwidth is not always ubiquitous or free
Client-side
Server-side 5. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
5
CPU & processing power is expensive
Client view
Provider View 6. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
6
Image source: http://thewrestlinglifeupdate.tumblr.com/ 7. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
7
Image source: http://thewrestlinglifeupdate.tumblr.com/
Multi-PARTY! Video Conferencing 8. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
8
Easy & cheap approach to multi-party: Mesh
8
Full Mesh
Works for a few parties
No server cost
Lowest latency 9. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
9
Mesh does not scale for many video conferees
9
Full Mesh
Clients get overloaded
Encode costs more than decode
Limited uplink bandwidth
Inconsistent performance across participants 10. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
10
Traditional Telephony Approach: MCU
10
Multipoint Control Unit (MCU)
Good at manipulating all media
Transcoding
Transizing
Transrating
Interworking
Server-side CPU intensive
Client can request different conference mixes
Usually client friendly
Downsizing & mixing can reduce bandwidth
Fewer client streams to process
MCU 11. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
11
Video UX: Traditional method –mixed screen
MCU
1
2
3
4
Mixed stream
1
2
3
4
3G Device 12. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
12
Video UX: Traditional method –active talker
MCU
1
2
3
4
Mixed stream
1
2
3
3G Device
Active Talker
Media Server Chooses Layout 13. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
13
Client app
App Server
Modern UX with MCU mixing, HTML5 & JavaScript
Browser
MCU
1
2
3
4
HTML5 Canvas
Javascript
Mixed stream
Layout
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 14. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED. 14
App Server Client app
2
Modern UX with MCU mixing, HTML5 & JavaScript
Browser
MCU
1 2
3 4
HTML5 Canvas
Javascript
Layout Mixed stream
"Lorem ipsum dolor sit
amet, consectetur
adipisicing elit, sed do
eiusmod tempor
incididunt ut labore et
dolore magna aliqua. Ut
enim ad minim veniam,
quis nostrud
exercitation ullamco
laboris nisi ut aliquip ex
ea commodo
consequat. Duis aute
irure dolor in
reprehenderit in
voluptate velit esse
cillum dolore eu fugiat
nulla pariatur.
Excepteur sint occaecat
cupidatat non proident,
sunt in culpa qui officia
deserunt mollit anim id
est laborum."
15. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED. 15
App Server Client app
2
Modern UX with MCU mixing, HTML5 & JavaScript
Browser
MCU
1 2
3 4
HTML5 Canvas
Javascript
Mixed stream
Application-defined UX
Layout
"Lorem ipsum dolor sit
amet, consectetur
adipisicing elit, sed do
eiusmod tempor
incididunt ut labore et
dolore magna aliqua. Ut
enim ad minim veniam,
quis nostrud
exercitation ullamco
laboris nisi ut aliquip ex
ea commodo
consequat. Duis aute
irure dolor in
reprehenderit in
voluptate velit esse
cillum dolore eu fugiat
nulla pariatur.
Excepteur sint occaecat
cupidatat non proident,
sunt in culpa qui officia
deserunt mollit anim id
est laborum."
Benefits:
Application defined UX
User specific & customizable layout
Lower client BW & CPU vs. mesh
16. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
16
Newer approach: SFU
16
SFU
Selective Forwarding Unit (SFU) routing
Clients send one & receive many
Client can instruct SFU which streams to send
High throughput
Can be lots of downlink bandwidth
Low latency 17. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
17
Newer approach: SFU
17
SFU
Selective Forwarding Unit (SFU) routing
Clients send one & receive many
Client can instruct SFU which streams to send
High throughput
Can be lots of downlink bandwidth
Low latency 18. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
18
New WebRTC approach: Simulcast
18
SFU
High bitrate
Low bitrate
Selective Forwarding Unit (SFU) with Simulcast
Clients send multiple streams to SFU
one high-bit rate
one or more lower-bit
Client directs SFU which streams to receive
Reduces bandwidth vs. SFU
Simulcast in WebRTCcoming 19. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
19
Future Approach with VP9 –SVC?
19
SFU
Medium
High
Low
Layered bitrates:
Selective Forwarding Unit (SFU) with SVC
Clients send layered stream to SFU
Varying bitrates –time, size, quality
SFU directs who gets what
Coming to WebRTC eventually 20. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
20
Typical media server network model
Load Balancer
Load Balancer
Client
Client
Client
Client
Client
Client
App Server
App Server
App Server
Media Server
Media Server
Media Server 21. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
21
Pseudo Call-flow with a media server
AS
LB
MS1
MS2
Client
Call signaling
Media control
MS1 status
MS2 status
Media control
Media 22. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
22
Pseudo Call-flow –traditional fail-over with RE-INVITE
AS
LB
MS1
MS2
Client
Call signaling –REINVITE with new addresses
Media control
MS1 status
MS2 status
Media control + call states
Media 23. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
23
Pseudo Call-flow –fail-over the cloud way
AS
LB
MS1
MS2
Client
Media control
MS1 status
MS2 status
New container
Media
Memcache & Virtual IP Address 24. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
24
When you are serious about scale
Declarative
Concurrency
Soft real-time
Robustness
Distribution
Hot code loading
External interfaces
Portability 25. COMPANY CONFIDENTIAL © COPYRIGHT 2014 DIALOGIC INC. ALL RIGHTS RESERVED.
25
ICE, STUN, and TURN save the day
Use of Public IP’s mitigates need for TURN servers
Open source TURN servers do reasonably well
Running the TURN server co- resident with the media server works well when you need it
Image source: webrtcHacks-http://webrtchacks.com/an-intro-to-webrtcs- natfirewall-problem/ Notas do Editor In most WebRTC design is additional bi-directional stream is added for each party.
Each end-point must fully encode and decode the stream for each party.
The better approach is to centralize and mix all the media in an MCU and send a single or subset of streams to the each device.
The better approach is to centralize and mix all the media in an MCU and send a single or subset of streams to the each device.
The better approach is to centralize and mix all the media in an MCU and send a single or subset of streams to the each device.
The better approach is to centralize and mix all the media in an MCU and send a single or subset of streams to the each device.
Some server cost
Reduced bandwidth
Reduced client processing
Requires specialized clients
Fine for a few calls
Run into CPS problems with many