Skip to content

Docker source station cluster, two-way streaming cannot be played simultaneously #1501

@XCY2018

Description

@XCY2018

Overview

Deployment of Two Origin Server Clusters and an Edge Server Using Docker

Deploy two origin server clusters and an edge server using Docker. The two streaming sources will be pushed to the two origin servers respectively, and VLC will play the RTMP stream from the edge server.

Question

  • Occasionally, we can play together, but most of the time we can only play videos from one source site.

  • Deployment Environment

  • Origin Server, EDGE:

  • CentOS 7 (virtual machine), pulled SRS 3.0 from Docker Hub.

  • Configuration file for origin server A:

# the config for srs origin-origin cluster
# @see https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster
# @see full.conf for detail config.

listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        console;
pid                 ./objs/origin.cluster.serverA.pid;
http_api {
    enabled         on;
    listen          9090;
}
vhost __defaultVhost__ {
    cluster {
        mode            local;
        origin_cluster  on;
        coworkers       192.168.0.59:9090;
    }
}
  • Configuration file for origin server B:

# the config for srs origin-origin cluster
# @see https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster
# @see full.conf for detail config.

listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        console;
pid                 ./objs/origin.cluster.serverB.pid;
http_api {
    enabled         on;
    listen          9090;
}
vhost __defaultVhost__ {
    cluster {
        mode            local;
        origin_cluster  on;
        coworkers       192.168.0.60:9090;
    }
}
  • Edge configuration file:

# the config for srs origin-edge cluster
# @see https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster
# @see full.conf for detail config.

listen              1935;
max_connections     1000;
pid                 objs/edge.pid;
daemon              off;
srs_log_tank        console;
vhost __defaultVhost__ {
    cluster {
        mode            remote;                              
        origin          192.168.0.60:1935 192.168.0.59:1935;
    }
}
  • Live streaming:

  • Windows 10 (Virtual Machine), OBS Studio 24.0.3,

Streaming test1 configuration:

image

Streaming test2 configuration:

image

Player:

win10 (local), VLC media player 3.0.8

test1 playback:

image

test2 playback:

image

TRANS_BY_GPT3

Metadata

Metadata

Assignees

Labels

BugIt might be a bug.TransByAITranslated by AI/GPT.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions