- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想构建一个处理来自用户网络摄像头的视频的网络应用程序。看起来 WebRTC 非常适合这个项目。但是,我很难在用户机器和 Kubernetes 集群中的 pod 之间创建对等连接。您将如何连接这两个对等点?
这个关于服务器故障的问题讨论了我遇到的问题:WEBRTC MCU/SFU inside kubernetes - Port Ranges . WebRTC 希望打开一堆端口,以便用户可以与服务器创建对等连接,但 Kubernetes 默认关闭端口。这是我的问题的改写:如何创建
RTCPeerConnections 将多个用户连接到 Kubernetes 集群中托管的应用程序?网络端口应该如何设置?
我最接近找到解决方案的是Orchestrating GPU-accelerated streaming apps using WebRTC ,他们的代码可在 GitHub .我不完全理解他们的方法,我相信这取决于 Istio .
最佳答案
您链接到的文档很有帮助,Orchestrating GPU-accelerated streaming apps using WebRTC
他们为 RTCPeerConnection
做了什么是:
使用两个单独的节点池(节点组):
Ingress
和负载均衡器DaemonSet
中的 PodTemplate 激活主机网络:
hostNetwork: true
他们使用
coturn作为 STUN/TURN 服务器。
The STUN/TURN service is run as a DaemonSet on each node of the TURN node pool. The coTURN process needs to allocate a fixed block of ports bound to the host IP address in order to properly serve relay traffic. A single coTURN instance can serve thousands of concurrent STUN and TURN requests based on the machine configuration.
关于kubernetes - 如何在 Kubernetes 上使用 WebRTC 和 RTCPeerConnection?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64232853/
我是一名优秀的程序员,十分优秀!