1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #319, move the edge configs to cluster.

This commit is contained in:
winlin 2015-08-30 08:30:04 +08:00
parent 6bd05f9cfc
commit 2b4fa2d73e
5 changed files with 154 additions and 71 deletions

View file

@ -7,6 +7,8 @@ max_connections 1000;
pid objs/edge.pid;
srs_log_file ./objs/edge.log;
vhost __defaultVhost__ {
mode remote;
origin 127.0.0.1:19350;
cluster {
mode remote;
origin 127.0.0.1:19350;
}
}

View file

@ -5,7 +5,9 @@
listen 1935
max_connections 1000;
vhost __defaultVhost__ {
mode remote;
origin 127.0.0.1:19350;
token_traverse on;
cluster {
mode remote;
origin 127.0.0.1:19350;
token_traverse on;
}
}

View file

@ -520,6 +520,73 @@ vhost same.vhost.forward.srs.com {
}
}
# vhost for stream cluster for RTMP/FLV
vhost cluster.srs.com {
# stream RTMP/FLV cluster config.
cluster {
# the mode of vhost, local or remote.
# local: vhost is origin vhost, which provides stream source.
# remote: vhost is edge vhost, which pull/push to origin.
# default: local
mode remote;
# for edge(remote mode), user must specifies the origin server
# format as: <server_name|ip>[:port]
# @remark user can specifies multiple origin for error backup, by space,
# for example, 192.168.1.100:1935 192.168.1.101:1935 192.168.1.102:1935
origin 127.0.0.1:1935 localhost:1935;
# for edge, whether open the token traverse mode,
# if token traverse on, all connections of edge will forward to origin to check(auth),
# it's very important for the edge to do the token auth.
# the better way is use http callback to do the token auth by the edge,
# but if user prefer origin check(auth), the token_traverse if better solution.
# default: off
token_traverse off;
# the vhost to transform for edge,
# to fetch from the specified vhost at origin,
# if not specified, use the current vhost of edge in origin, the variable [vhost].
# default: [vhost]
vhost same.edge.srs.com;
# when upnode(forward to, edge push to, edge pull from) is srs,
# it's strongly recommend to open the debug_srs_upnode,
# when connect to upnode, it will take the debug info,
# for example, the id, source id, pid.
# please see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLog
# default: on
debug_srs_upnode on;
}
}
# vhost for edge, edge and origin is the same vhost
vhost same.edge.srs.com {
# @see cluster.srs.com
cluster {
mode remote;
origin 127.0.0.1:1935 localhost:1935;
token_traverse off;
}
}
# vhost for edge, edge transform vhost to fetch from another vhost.
vhost transform.edge.srs.com {
# @see cluster.srs.com
cluster {
mode remote;
origin 127.0.0.1:1935;
vhost same.edge.srs.com;
}
}
# the vhost for srs debug info, whether send args in connect(tcUrl).
vhost debug.srs.com {
# @see cluster.srs.com
cluster {
debug_srs_upnode on;
}
}
@ -600,38 +667,6 @@ vhost security.srs.com {
}
}
# vhost for edge, edge and origin is the same vhost
vhost same.edge.srs.com {
# the mode of vhost, local or remote.
# local: vhost is origin vhost, which provides stream source.
# remote: vhost is edge vhost, which pull/push to origin.
# default: local
mode remote;
# for edge(remote mode), user must specifies the origin server
# format as: <server_name|ip>[:port]
# @remark user can specifies multiple origin for error backup, by space,
# for example, 192.168.1.100:1935 192.168.1.101:1935 192.168.1.102:1935
origin 127.0.0.1:1935 localhost:1935;
# for edge, whether open the token traverse mode,
# if token traverse on, all connections of edge will forward to origin to check(auth),
# it's very important for the edge to do the token auth.
# the better way is use http callback to do the token auth by the edge,
# but if user prefer origin check(auth), the token_traverse if better solution.
# default: off
token_traverse off;
}
# vhost for edge, edge transform vhost to fetch from another vhost.
vhost transform.edge.srs.com {
mode remote;
origin 127.0.0.1:1935;
# the vhost to transform for edge,
# to fetch from the specified vhost at origin,
# if not specified, use the current vhost of edge in origin, the variable [vhost].
# default: [vhost]
vhost same.edge.srs.com;
}
# vhost for dvr
vhost dvr.srs.com {
# dvr RTMP stream to file,
@ -1187,17 +1222,6 @@ vhost hooks.callback.srs.com {
}
}
# the vhost for srs debug info, whether send args in connect(tcUrl).
vhost debug.srs.com {
# when upnode(forward to, edge push to, edge pull from) is srs,
# it's strongly recommend to open the debug_srs_upnode,
# when connect to upnode, it will take the debug info,
# for example, the id, source id, pid.
# please see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLog
# default: on
debug_srs_upnode on;
}
# the main comments for transcode
vhost example.transcode.srs.com {
# the streaming transcode configs.