-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of the Box CoTURN setup seems unlikely to work well #33
Comments
Researching CoTURN more, I'm thinking that given the current DaemonSet replicaset, a round-robin record setup would be best, and that requires a configurable value. The second option would be to use the ATLERNATE-SERVER scheme, which requires one pod to answer initial requests and distribute them to the others. This second method may be better for Deployment replicasets in large clusters where one does not want coturn pods on every node, though working out the exact method may take some playing with. These thoughts are based on the docs linked and quoted below, which seem to imply that putting coturn behind an upstream LB has limitations:
|
Have you read the notes I left in values.yaml by chance? You're right, installing Coturn is a big pain point at the moment, but I've included two possible strategies, one of which should work.
The gist of it is this: since we can't run an external load balancer, the simpleset setup I envision is binding to ports on the nodes themselves. The two strategies for doing this are:
Then, once you have Coturn serving traffic on one or more nodes, set up a DNS round-robin record to the public IPs of each of your nodes.
I'd be interested to hear more about this. I thought TURN (or at least Matrix's usage of TURN for voip calls) had to run over UDP? |
Their docs imply that there is a TCP mode for coturn, but you might be right about Matrix, I am still combing through docs for both things. Currently though, the configuration in matrix is hardcoded to use the DNS name of the matrix server, and I need to point it to a round-robin dns record for the nodeport as I cannot use the dns record that is pointed to my loadbalancer:
|
Ah, fair enough, fixed in 95d0547 and version 2.2.0 (which I just pushed and includes Synapse 1.15) |
This is interesting: https://matrix.org/docs/spec/client_server/r0.6.1#voice-over-ip, section 13.3.3.1, the sample response includes TURN servers with |
So the media will still go via UDP bit the ice candidate gathering will happen on tcp |
I was struggling with this and have made some changes in #41. I also uncovered an issue with the CoTURN shared secret that I've logged in #42. After these changes I was able to get CoTURN working properly on DigitalOcean Kubernetes Service using DaemonSet and ClusterIP and creating round-robin DNS records for turn services. |
Now that I've gotten Riot and Synapse working an stable I'm turning my attention to bridges and audio/video.
Looking at CoTURN docs and this setup, I think the OOTB config the chart is using right now needs tweaking. For starters I believe each CoTURN server (or pod in this case) needs it's own external IP and they aren't supposed to be behind a loadbalancer. Another challenge is it seems only about 50% of cloud providers will provide UDP port support on a loadbalancer.
I think we either need to put coturn into TCP mode or allow the array of URIs to be able to be specified so a DNS record can be pointed to each kube node.
The text was updated successfully, but these errors were encountered: