https://github.com/monibuca/clusterplugin
cluster plugin for monibuca
https://github.com/monibuca/clusterplugin
cluster
Last synced: about 1 year ago
JSON representation
cluster plugin for monibuca
- Host: GitHub
- URL: https://github.com/monibuca/clusterplugin
- Owner: Monibuca
- License: mit
- Created: 2020-03-01T02:32:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-01T17:06:35.000Z (over 3 years ago)
- Last Synced: 2025-04-05T17:51:09.896Z (about 1 year ago)
- Topics: cluster
- Language: Go
- Size: 4.03 MB
- Stars: 4
- Watchers: 2
- Forks: 6
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clusterplugin
cluster plugin for monibuca
实现了基本的集群功能,里面包含一对发布者和订阅者,分别在主从服务器中启用,进行连接。 起基本原理就是,在主服务器启动端口监听,从服务器收到播放请求时,如果从服务器没有对应的发布者,则向主服务器发起请求,主服务器收到来自从服务器的请求时,将该请求作为一个订阅者。从服务器则把tcp连接作为发布者,实现视频流的传递过程。
# 插件名称
Cluster
# 配置
源服务器的配置是ListenAddr,用来监听从服务器的请求。 边缘服务器的配置是OriginServer,表示源服务器的地址。 当然服务器可以既是源服务器也是边缘服务器,即充当中转站。
## 边缘服务器的配置
```toml
[Cluster]
OriginServer = "localhost:2019"
```
## 源服务器的配置
```toml
[Cluster]
ListenAddr = ":2019"
```
# 示意图
