Skip to content

Commit

Permalink
Fix #1520, #1223, bug for origin cluster 3+ servers. 3.0.74
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Dec 19, 2019
1 parent 0200baa commit acfeb8a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trunk/conf/origin.cluster.serverA.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion trunk/conf/origin.cluster.serverB.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
20 changes: 20 additions & 0 deletions trunk/conf/origin.cluster.serverC.conf
Original file line number Diff line number Diff line change
@@ -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;
}
}
5 changes: 5 additions & 0 deletions trunk/src/app/srs_app_rtmp_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit acfeb8a

Please sign in to comment.