Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-03-03 16:17:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7da34209978fc6d5fdb032ffdf8afadd5b0facc5
7da34209
1 parent
7daf890d
update readme, multiple process and cli architecture.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
48 行增加
和
18 行删除
README.md
README.md
查看文件 @
7da3420
...
...
@@ -239,25 +239,55 @@ Schema#2: SRS RTMP Edge server pull stream from origin (or upstream SRS
</pre>
(plan) SRS Multiple processes Architecture:
<br/>
<pre>
+---------------------------+
+-----+ worker process(3) |
+----------------+ | +---------------------------+
| master process |---(2)---+
| (1)manager | | +---------------------------+
+----------------+ +-----+ worker process N |
| +---------------------------+
|
| +---------------------------+
+-----+ bandwidth test process(4) |
+---------------------------+
+-------------------+ +-----------+
| upnode server | + client +
+---------+---------+ +-----+-----+
--------------+------------network-------+---------
| |
+-----------+ +----+-----------+ +----+------+
| master +--fork->-+ back source(1) +-->-pull-+ stream(2) +
+-----+-----+ +----------------+ +-------+---+
+-------------------------------------fork--->-----+
| +-------------------+
+--fork->--+ bandwidth test(3) +
+-------------------+
Remark:
(1) back source process: create by master process, get stream from
upnode server, serve the stream process.
(2) stream process: create by master process, get stream from back
source process, serve the client.
(3) bandwidth test process: create by master process, serve the
bandwidth test client.
Remark:
(a) This multiple processes architecture is design by wenjie, it's a
very simple and powerful multiple process architecture, for the
master no need to pass between stream process.
(b) The CLI architecture is similar to this, instead, cli process
will collect informations from all stream process, master process
only send signals to child processes.
</pre>
CLI Architecture:
<pre>
+---------+
+--+ stream1 +---------+
| +---------+ |
+--------+ | +---------+ | +-------+
| master +--fork->-+--+ streamN +---pull--+>--+ cli +
+--------+ | +---------+ | +-------+
| +-------------+ |
+--+ back source +-----+
+-------------+
Remark:
(1) master process: to fork processes, schedule fd(client) to the "right"
process, forward messages between processes
(2) communication: master process use unix domain socket to communicate
with worker processes.
(3) worker process: to provide RTMP streaming service, generate HLS files.
(4) bandwidth test process: for all bandwidth test request, to make the
bandwidth testing has minimal effect to streaming service
(1) master listen the global api port, for example, 33330
(2) back source and stream processes listen at private api port,
for example, 33331, 33332, 33333
(3) work processes(stream and back-source), report private api
port to master global api port.
(4) cli connect to master global api port, get all other private
api ports
(5) cli connect to each stream/back-source process to get api data,
cli analysis and summary the data, return to user.
</pre>
Bandwidth Test Workflow:
<pre>
...
...
请
注册
或
登录
后发表评论