ossrs/srs

WebRTC:Support Cluster over QUIC.

yzw607 opened this issue · 17 comments

Two questions:

  1. Does WebRTC not function on an Edge server?
  2. Does WebRTC also not function on an Origin server?

How can WebRTC be supported in a cluster configuration?

The Edge is just designed for live streaming, that is RTMP, so the Edge only supports RTMP/HTTP-FLV. Neither WebRTC nor HLS is not supported by Edge, it's the features of Origin.

The cluster for HLS is regular HTTP file-based server, like Nginx or ATS. And cluster for WebRTC is called Cascading over QUIC, it's actually an OriginCluster connected with QUIC not RTMP.

Right now, most of WebRTC server does not support cluster, or does not work well, because WebRTC is too complex. We need time to design the arch carefully, especially we support both live streaming and WebRTC.

Note that TURN server is also could use as "Edge-like" for WebRTC origin server, but it does not support stream aggregation, which means it by-pass all connections and streams to SRS, so it won't help to extend the capability, it only works as a "by-pass proxy" over TCP or UDP. In one word, TURN is not a WebRTC cluster, it's a proxy near user to improve the network quality.

We may support WebRTC cluster, the OriginCluster over QUIC, in SRS 5.0 or later. It depends on our time resource, and whether we get a stable and simple enough arch.

The arch for WebRTC Cluster

WebRTC Cluster

  • No edge for WebRTC.
  • Origin works for LiveStreaming and WebRTC, it holds the stream.
  • The OriginCluster for LiveStreaming is based on RTMP302, while OriginCluster for WebRTC is based on QUIC.

RTC中叫级联而不是RTMP这种树状结构的回源。

级联是要支持的,但目前其他的RTC服务器也没有支持。

可以替代的方案是用TURN配合SRS做级联。

明白了,感谢大神回复!

肖志宏大神正在看这个,预计会在SRS5支持。

肖志宏大神正在看这个,预计会在SRS5支持。

期待!

RTC中叫级联而不是RTMP这种树状结构的回源。

级联是要支持的,但目前其他的RTC服务器也没有支持。

可以替代的方案是用TURN配合SRS做级联。

请教大神,TURN配合SRS做级联具体是怎么实现呢?能大致说说方向吗?

期待5.0

RTC中叫级联而不是RTMP这种树状结构的回源。
级联是要支持的,但目前其他的RTC服务器也没有支持。
可以替代的方案是用TURN配合SRS做级联。

明白了,感谢大神回复!

不明白,你知道如何配置分層rtc的配置,謝謝

@wangjin TURN is not used for clustering, but for traversing firewalls, such as using the TCP protocol or as an exit gateway. Since TURN only forwards traffic and does not aggregate, it cannot be expanded. Therefore, the traffic after TURN will not decrease, and with SFU, clients do not need to have so many uplinks, and the same is true for clusters.

@phusinh Clusters often have a service discovery mechanism. Simply put, you can use configuration files to discover each other and define the worker network within the cluster. You can also use a separate backend service for service discovery. You can refer to this article StackOverflow

@wangjin TURN不是用来做集群,而是用来穿墙,比如走TCP协议,或者作为出口网关用。因为TURN是转发流量,并不会做汇聚,也就是不能扩展,所以经过TURN之后的流量不会变少,而有SFU之后客户端不用有那么多上行,集群也是一样的。

@phusinh 集群往往有个服务发现,简单来说可以用配置文件来相互发现,定义集群中的worker网络。也可以用独立的后端服务来做服务发现。可以参考这个文章 StackOverflow

你好 !你誤解了我的意思,我想問一下如何為webrtc創建origin cluster,關於創建origin cluster,我參考了你的說明,解決了。

How is the current development progress of RTC cascading?
Is there a separate branch for joint development now?

There hasn't been much progress on RTC clustering lately. It would be great if you could first outline the ideas and architecture, and everyone can participate.

Update: I think we should support proxy for origin servers, which is much more useful than WebRTC cascading. Proxy is designed for origin server and all protocols, so we can use proxy to build RTMP/FLV cluster, or SRT cluster, or WebRTC cluster, or GB28181 cluster.

@winlinvip SRS5 has been released now, does it support WebRTC clustering?

Does this mean that RTC does not support the Origin and Edge mode? I saw an article before that said WebRTC can also expand the streaming capability through Edge.
https://mp.weixin.qq.com/s/pd9YQS0WR3hSuHybkm1F7Q
image

Update as of 2023.07.18:

  1. SRS Edge is designed for live streaming and not for WebRTC. Although some articles suggest that Edge can be modified to support WebRTC, it is not currently supported and there are no plans to implement it.

  2. There are no current plans for a WebRTC cluster that cascades between origin servers using the QUIC protocol. This is because it is highly complex and will not be supported.

  3. We will support a proxy cluster, which will also serve as a cluster for all protocols. The proxy cluster is not cascading and does not use QUIC. It is significantly simpler in comparison.