HOME > EN > OriginCluster
About the design of Origin Cluster, please read the Issue#464. SRS Origin Cluster is designed for large amount of streams.
Remark: Origin cluster only supports RTMP, use Edge to transmux RTMP to FLV.
The config for origin cluster:
vhost __defaultVhost__ {
# The config for cluster.
cluster {
# The cluster mode, local or remote.
# local: It's an origin server, serve streams itself.
# remote: It's an edge server, fetch or push stream to origin server.
# default: local
mode local;
# For origin(mode local) cluster, turn on the cluster.
# @remark Origin cluster only supports RTMP, use Edge to transmux RTMP to FLV.
# default: off
# TODO: FIXME: Support reload.
origin_cluster on;
# For origin (mode local) cluster, the co-worker's HTTP APIs.
# This origin will connect to co-workers and communicate with them.
# please read: https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster
# TODO: FIXME: Support reload.
coworkers 127.0.0.1:9091 127.0.0.1:9092;
}
}
Remark: Say, a client, a player or edge server, starts to play a stream from a origin server. The origin server would query the coworkers and redirect client by RTMP302 when it doesn't serve the stream. If no origin is found, it responses error. The HTTP API response message includes fields for whether owns the stream, and stream information.
Remark: Note in particular that server response error when the requested stream hasn't been publish to origin server. For independent origin server, server responses success and waits for stream to be published. While when origin in origin cluster, as the stream might not be published to it, it should responses error and shouldn't wait for the stream.
To use origin cluster, please read #464.
We also recommend to use a edge server please read here. The edge server can transmux RTMP to HTTP-FLV, supports fault-tolerance.
2018.02
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。