srs: Support RTMP 302, support RTMP 302 redirection.

https://github.com/winlinvip/simple-rtmp-server/issues/92

If RTMP could support a 302 redirect, it would be more advantageous for CDN scheduling. Wowza returns a reject, and then the player redirects: http://developer.longtailvideo.com/trac/ticket/1876

Considering if it could be supported in NetConnection/NetStream, it would be more advantageous.

TRANS_BY_GPT3

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 21 (20 by maintainers)

Commits related to this issue

Most upvoted comments

SRS can actually consider supporting multi-processes with this approach. As a solution, the master process specifies multiple addresses and redirects to other ports. This way, each process is completely independent, with high scalability and performance. It is also extremely simple.

To be specific:

  1. Start a master SRS instance listening on port 1935.
  2. Start several edge SRS instances that connect back to the master SRS on ports 19350/19351, etc.
  3. Configure multiple redirects in the master SRS.
  4. When a player connects to the master SRS, it will be redirected to an edge SRS on the local machine using round-robin on ports 19350/19351, etc. With this structure, there is no need to modify any code, just make slight changes to achieve multi-processing.

TRANS_BY_GPT3