Skip to content
New issue

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

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

Already on GitHub? # to your account

FEAT: How to do load balancing and service discovery for WEBRTC deployment in K8S #3329

Closed
jinleileiking opened this issue Dec 22, 2022 · 1 comment
Assignees
Labels
Discussion Discussion or questions. TransByAI Translated by AI/GPT.

Comments

@jinleileiking
Copy link

jinleileiking commented Dec 22, 2022

When deploying WebRTC streaming using k8s, you may encounter an issue:

graph TD;
    pod1-->lb-->player;
    pod2-->lb;
    pod3-->lb;
    pod4-->lb;
Loading

Assuming the streaming is happening in pod1, due to load balancing, UDP packets may be routed to pod3. In this case, there are two possible solutions:

  1. Introduce a proxy to handle WebRTC signaling messages, which is a complex solution. Refer to the solution provided in Cluster: K8s: Proxy to extend origin servers. #3138.
graph TD;
    pod1-->proxy-->lb-->player;
    pod2-->proxy;
    pod3-->proxy;
    pod4-->proxy;
Loading
  1. pod3, find pod1 and start pulling the stream.
graph TD;
    pod1-->lb-->player;
    pod2-->lb;
    pod3-->lb;
    pod4-->lb;
    pod3-->pod1;
Loading

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Dec 24, 2022

WebRTC Cascading: #2091

WebRTC Proxy: #3138

For tens of millions or hundreds of millions of concurrent connections, cascading is a necessary solution, which is quite complex but also highly scalable.

For general situations, Proxy is simple and reliable, with decent scalability support. We will prioritize supporting the Proxy solution.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title FEAT:WEBRTC 级联功能 FEAT: K8S部署WEBRTC如何做负载均衡和服务发现 Dec 24, 2022
@winlinvip winlinvip self-assigned this Dec 24, 2022
@winlinvip winlinvip added the Discussion Discussion or questions. label Dec 24, 2022
@winlinvip winlinvip changed the title FEAT: K8S部署WEBRTC如何做负载均衡和服务发现 FEAT: How to do load balancing and service discovery for WEBRTC deployment in K8S Jul 29, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Discussion Discussion or questions. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants