From the wiki, the coworkers means "The HTTP APIs of other origin servers in the cluster". In our origin cluster, I config it like this:
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 192.168.1.101:1985 192.168.1.102:1985 192.168.1.103:1985 192.168.1.XXX:1985;
}
}
If there were thousands of SRS servers in the cluster, every SRS server should configure the lots of other origin SRS servers, is this right?
Is this affect the performance by query http api to find the right stream in which SRS server? If the stream is the last one in coworkers, I think it will have significant delay.
So I want to know, is there other best engineering practice to optimize this issue?