1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-12 11:21:52 +00:00

Fix #1520, #1223, bug for origin cluster 3+ servers. 3.0.74

This commit is contained in:
winlin 2019-12-19 14:04:26 +08:00
parent 0200baa179
commit acfeb8a66f
6 changed files with 31 additions and 3 deletions

View file

@ -145,6 +145,7 @@ For previous versions, please read:
## V3 changes
* v3.0, 2019-12-18, Fix [#1520][bug #1520] and [#1223][bug #1223], bug for origin cluster 3+ servers. 3.0.74
* v3.0, 2019-12-18, For [#1042][bug #1042], add test for RAW AVC protocol.
* v3.0, 2019-12-18, Detect whether flash enabled for srs-player. 3.0.73
* v3.0, 2019-12-17, Fix HTTP CORS bug when sending response for OPTIONS. 3.0.72
@ -1532,6 +1533,8 @@ Winlin
[bug #1042]: https://github.com/ossrs/srs/issues/1042
[bug #1445]: https://github.com/ossrs/srs/issues/1445
[bug #1506]: https://github.com/ossrs/srs/issues/1506
[bug #1520]: https://github.com/ossrs/srs/issues/1520
[bug #1223]: https://github.com/ossrs/srs/issues/1223
[bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx
[exo #828]: https://github.com/google/ExoPlayer/pull/828

View file

@ -15,6 +15,6 @@ vhost __defaultVhost__ {
cluster {
mode local;
origin_cluster on;
coworkers 127.0.0.1:9091;
coworkers 127.0.0.1:9091 127.0.0.1:9092;
}
}

View file

@ -15,6 +15,6 @@ vhost __defaultVhost__ {
cluster {
mode local;
origin_cluster on;
coworkers 127.0.0.1:9090;
coworkers 127.0.0.1:9090 127.0.0.1:9092;
}
}

View file

@ -0,0 +1,20 @@
# the config for srs origin-origin cluster
# @see https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster
# @see full.conf for detail config.
listen 19352;
max_connections 1000;
daemon off;
srs_log_tank console;
pid ./objs/origin.cluster.serverC.pid;
http_api {
enabled on;
listen 9092;
}
vhost __defaultVhost__ {
cluster {
mode local;
origin_cluster on;
coworkers 127.0.0.1:9090 127.0.0.1:9091;
}
}

View file

@ -613,6 +613,11 @@ srs_error_t SrsRtmpConn::playing(SrsSource* source)
+ "vhost=" + req->vhost + "&ip=" + req->host + "&app=" + req->app + "&stream=" + req->stream
+ "&coworker=" + coworkers.at(i);
if ((err = SrsHttpHooks::discover_co_workers(url, host, port)) != srs_success) {
// If failed to discovery stream in this coworker, we should request the next one util the last.
// @see https://github.com/ossrs/srs/issues/1223
if (i < (int)coworkers.size() - 1) {
continue;
}
return srs_error_wrap(err, "discover coworkers, url=%s", url.c_str());
}
srs_trace("rtmp: redirect in cluster, from=%s:%d, target=%s:%d, url=%s",

View file

@ -27,7 +27,7 @@
// The version config.
#define VERSION_MAJOR 3
#define VERSION_MINOR 0
#define VERSION_REVISION 73
#define VERSION_REVISION 74
// The macros generated by configure script.
#include <srs_auto_headers.hpp>