RTP forwarding for scaling replicas

Hello!

We want to implement scaling for our videorooms. If one of replicas can’t handle rooms anymore, we want to settle room on another replica and start RTP forwarding streams from first replica to second and from second to first.

I found that I can do rtp_forward request.

{
    "request": "rtp_forward",
    "room": <room_id>,
    "publisher_id": <publisher_id>,
    "host": "<secondary_replica_host>",
    "streams": [
        {
            "mid": "audio",
            "port": <audio_port>,
            // additional stream parameters
        },
        {
            "mid": "video",
            "port": <video_port>,
            // additional stream parameters
        }
        // More streams if needed
    ]
    // SRTP parameters if needed
}

But I didn’t find, how do I consume these rtp forward from videoroom plugin. Can you clarify this, please?

RTP forwarding is to feed the Streaming plugin. For the VideoRoom you need cascading.

2 Likes

@lorenzo Thanks for clarifying this.
One more thing, did I understood right, that I can set remote publisher on first instance for someone who are on second instance and people on first instance will get his packets.
But for him to get other peoples’ packets, they need to be setup as remote publishers on his instance as well?

Is there any debug information to check whether streams are forwarding to another instance?