Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTMP Pull and Auto relay #120

Open
DucTM31 opened this issue Feb 15, 2019 · 0 comments
Open

RTMP Pull and Auto relay #120

DucTM31 opened this issue Feb 15, 2019 · 0 comments

Comments

@DucTM31
Copy link

DucTM31 commented Feb 15, 2019

Hi, I am trying to use your nginx module as an edge server.

Things work fine on single worker mode. When I try the multiple workers there is a problem with it:
When a client connects and requests to play a stream, the stream is pulled from an origin server and push to other workers with ngx-local-relay. That part works as expected. But when a second client connects to another worker and requests the same stream, it also creates another pull from the origin and relays the stream to others worker.
Here is how I config nginx:
Multiple-worker

worker_processes 4;   # multi-worker process mode
relay_stream all;    # stream relay mode
relay_reconnect_time 1s;
auto_relay_socket_dir /tmp;

Edge-server - the callback return 300 with the rtmp stream url from origin

 application edgelive {
      live on;
      on_play http://host:port/v1/replay_pull;
 }

Stat from one worker:
image
Stat from another worker:
image
List tcp connection: - Origin server 10.240.152.180 - Edge 10.240.152.181 - Client 10.30.175.105
image

Is this a bug? or Do I need a different nginx config?
Any help would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant