3

I'm trying to set up a cluster (GKE, but I can change to other providers if necessary) of AntMedia Server.

According to the doc 1, the server needs to be accessible from outside with a wide range of port, basically all the UDP ports: UDP:5000-65000 (WebRTC)

I tried to declare all the ports in a LoadBalancer service but GKE seems to allow a maximum of 100 ports per service.

What can I do to expose this range of port to the outside world?

Quang Linh Le
  • 657
  • 1
  • 6
  • 14

2 Answers2

5

WebRTC software isn't intended to be used behind load balancers usually. You may use public VM instances and application level load balancing instead of cloud load balancing.

Possible really expensive workaround is to create a lot of LoadBalancer services with the same IP:

spec:
  loadBalancerIP: <Your_LB_IP>

Just don't forget to create reserved static IP before all LBs

gcloud compute addresses create antmedia-lb --global --project=$PROJECT_ID

Maybe You may configure UDP port range limit to 200 or 300 ports instead of 60000 in AntMedia settings and use 2-3 LBs to see how it goes.

Alex Vorona
  • 1,028
  • 7
  • 7
3

Alex's answer has some insight, but even though it's not possible to create a lot of LB services because the number of NodePort ports is limited (yes, LB need NodePort to work with, or at least that's what GKE tells me)

The solution so far is to use a DaemonSet, enable hostNetworking so that the (only one container per pod) can listen directly on the host's network interface.

From there we can create an external LB if needed to forward all the ports to the nodes.

Quang Linh Le
  • 657
  • 1
  • 6
  • 14
  • why would i need a daemonset - pod on each node? could you elabore? I could just have a statefulset node where we route all the ports to?!?! – U.V. Feb 15 '21 at 23:31