You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 23, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: doc/design/quic-cascading.md
+55-12Lines changed: 55 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ With this deployment, Rabbitmq will be in the cloud and other region-based modul
11
11
With this deployment, each region will deploy a separate OWT cluster. It’s easier for large deployment and the internal OWT cluster will work independently when region network disconnects with cloud. Here is a comparison for these 2 deployments:
12
12

13
13
14
-
We will concentrate on OWT cascading design here.
14
+
We will focus on OWT cascading design here.
15
15
16
16
## Cloud Management service
17
17
@@ -20,8 +20,12 @@ Cloud management service is deployed in a cloud for central management, it shoul
20
20
- Accept client request and assign OWT cluster to client
21
21
- Record conference info and trigger OWT cluster cascading
22
22
- Maintain OWT cluster info and conference info
23
-
1 OWT cluster register
23
+
24
+
### OWT cluster register
25
+
24
26
OWT will register cluster info to cloud management service when the cluster is launched. This cluster registration work will be done in clusterManager. clusterManager will send the register requests to cloud after it gets service key/id info from management_api
27
+
28
+
```
25
29
object(clusterInfo) {
26
30
id: string, // name of the OWT cluster
27
31
region: string, // region of the OWT cluster
@@ -32,36 +36,62 @@ OWT will register cluster info to cloud management service when the cluster is l
32
36
mediabridgeip: string, // OWT media bridge listener ip
33
37
mediabridgeport: string //OWT media bridge listener port
34
38
}
39
+
```
40
+
35
41
OWT cluster manager will update capacity info to cloud if a new purpose agent joins the cluster or no such purpose agent lives in the cluster.
OWT cluster manager will report room token to cloud for event/media bridge QUIC server to validate QUIC client connection. The token will be generated when room is initialized.
51
+
52
+
```
41
53
object (tokeninfo) {
42
54
room: string // conference room id
43
55
token: string // conference room token
44
56
}
45
-
2 Handle client request
57
+
```
58
+
59
+
### Handle client request
60
+
46
61
Client will send a join conference request to cloud management service:
47
62
Request body:
48
-
type content
49
-
json conferenceInfo
63
+
64
+
type | content
65
+
-------------|-----
66
+
json | conferenceInfo
67
+
68
+
```
50
69
object(conferenceInfo) {
51
70
id: conferenceId,
52
71
type: conferenceType
53
72
}
73
+
```
74
+
54
75
Response body:
55
-
type content
56
-
json clusterInfo
76
+
77
+
type | content
78
+
-------------|-----
79
+
json | clusterInfo
80
+
81
+
```
57
82
object(clusterInfo) {
58
83
ip: ip, //OWT cluster web server ip
59
84
port: port, //OWT cluster web server port
60
85
room: roomId //OWT cluster room id
61
86
}
62
-
3 Create room request
87
+
```
88
+
89
+
### Create room request
90
+
63
91
Cloud management service will check saved conference info list to see if room has been created for this conference id in the owt cluster, if not, cloud management service will send create room request to owt cluster with room configuration according to client conference type, owt cluster will response with created room info.
64
92
Users can define several conference templates which includes different room configurations, such as publication limit, SFU only. etc, so client can join specific kinds of room by specifying conference type. If no conference type is specified, then client will be assigned with the default room configuration template.
93
+
94
+
```
65
95
object(conference) {
66
96
id: conferenceId,
67
97
cluster: [object(cluster)]
@@ -70,7 +100,10 @@ Users can define several conference templates which includes different room conf
70
100
id: clusterId,
71
101
room: roomId
72
102
}
73
-
4 Trigger OWT cascading
103
+
```
104
+
105
+
### Trigger OWT cascading
106
+
74
107
Here is the workflow for OWT cascading trigger:
75
108

76
109
In step 3, cloud management service will send a create room request with room configuration to ensure that different rooms in different OWT clusters serving for one conference will share the same room configuration. When getting a new client joining conference request and assigning owt cluster to client, cloud management service will trigger cascading if there are other OWT clusters in the same conferencing after getting the new client successfully joined room message from the assigned OWT cluster.
@@ -90,11 +123,13 @@ Request body:
90
123
---------|------
91
124
json|cascading
92
125
126
+
```
93
127
object(cascading) {
94
128
connectip: ip, //quic server ip address of owt cluster to connect
95
129
connectport: port, // quic server port of owt cluster to connect
96
130
room: roomId, // room id of owt cluster to connect
For event cascading, each cluster will setup a quic session with another OWT, that means one quic session will represent one cascading connection between 2 OWT clusters. All the events in cluster rooms will be sent to another cluster through this quic session. Each conference in cascaded cluster will associate with a quic stream.
For event bridge, the earlier joined cluster event bridge will work as quic server, and the later joined cluster event bridge will work as quic client and connect to previous joined cluster event bridge. Inside the OWT cluster, room id will be associated with related quic stream id, so every time when new data comes from quic stream, event bridge will check associated room id with this quic stream id and forward coming cascaded event data to specific conference node. Then the event cascading process between clusters will work properly.
update|Stream mute/unmute status update|setStreamMute
124
162
initialize|Initialize stream and participant info to cascaded owt cluster|sonNewClusterCascaded
125
163
126
-
If owt cluster 2 successfully establishes QUIC connection with owt cluster 1, owt cluster 1 will send “initialize” event including all the room objects to owt cluster 2, then in owt cluster 2 event bridge, bridge will parse the message and simulate participant streams actions to owt cluster 2 conference node.
127
-
Streams:
164
+
If owt cluster 2 successfully establishes QUIC connection with owt cluster 1, owt cluster 1 will send “initialize” event including all the room objects to owt cluster 2, then in owt cluster 2 event bridge, bridge will parse the message and simulate participant streams actions to owt cluster 2 conference node.
165
+
166
+
### QUIC streams:
167
+
128
168
QUIC client will create a bidirectional stream after successfully establishing QUIC connection with QUIC server. QUIC client will associate the created stream id with conference rpcId where startCascading event is from. QUIC client will then send the remote room info to server, server will bind the stream id with roomid retrieved from stream data.
129
169
When a conference node in the cluster exits, event bridge will check the QUIC stream associated with it and terminate the stream.
Media bridge will be used to transfer media streams between 2 OWT clusters. One QUIC connection will be established for each room in the cluster, and each OWT forward stream will be send through QUIC stream. For WebRTC stream, audio and video track of the same OWT forward stream will be sent out separately in different QUIC stream.
136
178
Each media bridge node will be launched as QUIC server listening at the configured port. If the bridge gets a startCascading request, it will work as QUIC client and proactively establish QUIC connection with the QUIC server in another OWT cluster. A QUIC stream for signaling purpose will be created to exchange cluster info and make sure QUIC connection is ready to work for both sides. Here is a workflow for the initial QUIC connection establish process:
0 commit comments