Improving video connection success rate

Hi all, I am having a problem with some folks not being able to stream video. So I want to ask a little bit about technical solutions but I also for general “bigger picture” ideas and solutions.

I run a consumer web chat app that allows many-to-many videoconferencing. I have NON-technical users and they are literally all over the world with lots of different configurations: many different browsers, networks, some are on a VPN, etc. etc. I know that my current configuration is working well for a lot of them, but at the same time, some significant % of my customers can’t get the video feeds to work. (I know because I get a lot of angry support emails, lol)

Right now I am running a mediasoup v2 server on port 443, on a standalone dedicated server with a public IP, that has all ports completely open.

Because I can’t reproduce any problems (everything’s working fine for me here), I can’t tell you why it is failing for some. And because of the wide range of my customers’ configurations, I would not be surprise if I am dealing with several different problems that affect different people in different ways. The only 100% definite known problem I have is a customer who says it always fails on VPN but works perfectly when he is not on VPN. So maybe that’s the first thing I fix, since it is a tangible, reproducible problem.

The only problems I see in my mediasoup log is [identifier]:*: disconnected: transport error soon after someone connects, with no activity in between. There are a few of these, which makes me think these are my users that can’t get video to connect.

So. Because of all this, I think my best approach is to try to fix the VPN issue, and also to generally “harden” and improve my whole WebRTC network structure as much as possible. And hope that it will improve the situation for my customers.

This leads me to 3 questions.

  1. I assume a TURN server can’t hurt and it might help. Does a TURN server always run on port 443 (where I currently have mediasoup)? Would it be wise to move my mediasoup to a different port and then add a TURN server on 443? Or run TURN on a different port?

  2. Since the VPN problem is the currently the only problem that I can definitely identify/reproduce, how can I fix this issue? I realize this might have more to do with the signaling protocol that comes before mediasoup starts… but would still appreciate ANY mercy/help in approaching this problem!! :slight_smile:

  3. Any other suggestions for how to generally improve/harden this whole configuration and improve connectivity for my users so their video feeds start working? (Like, what else can I add/change/improve to just make it better for more people and edge cases?) I’m open to any ideas and happy to throw resources at the problem.

I’m a little stuck and I GREATLY appreciate (and thank you in advance) for your thoughts. I am happy to work hard on this and do my part (and contribute any new knowledge back to this group) but I’m not sure where to start or how to best proceed.

Best regards from Zürich, Switzerland–
Eric

  • I assume a TURN server can’t hurt and it might help. Does a TURN server always run on port 443 (where I currently have mediasoup)? Would it be wise to move my mediasoup to a different port and then add a TURN server on 443? Or run TURN on a different port?

You don’t have “mediasoup running on port 443” because mediasoup does not listen for HTTP or WebSocket traffic at all. You may mean your HTTP/WS signaling server (which is not part of mediasoup).

For worst network cases you should have your TURN server listening into TLS port 443 with a proper TLS certificate. Since some networks (WiFi in hotels and so on) block traffic other than 80 and 443, you’d rather have TURN listening in TLS 443 of public IP_A and your HTTP/WS signaling server in TLS 443 of public IP_B.

  • Since the VPN problem is the currently the only problem that I can definitely identify/reproduce, how can I fix this issue? I realize this might have more to do with the signaling protocol that comes before mediasoup starts… but would still appreciate ANY mercy/help in approaching this problem!! :slight_smile:

I don’t know why the VPN is the problem. No info. Try to check what exactly is wrong by testing a browser with VPN, check chrome://webrtc-internals, enable and check mediasoup server side logs, use mediasoup server side and mediasoup-client local side getStats(), etc.

Thank you for this reply. What do you recommend is the best HTTP/WS signaling server software? Because right now I don’t know what I’m using (I only see mediasoup) but I don’t think it’s working well. Perhaps the first thing I should do is get that all set up and sorted out.

I’ll also try your ideas for debugging the VPN connection, thank you.

Thank you for this reply. What do you recommend is the best HTTP/WS signaling server software?

Definitely I just wish to provide support about mediasoup :slight_smile:

Because right now I don’t know what I’m using (I only see mediasoup)

I said that mediasoup does not have any signaling server. I assume you are using the mediasoup-demo project and wrongly assume that “that’s mediasoup”. But it’s not:

but I don’t think it’s working well. Perhaps the first thing I should do is get that all set up and sorted out.

I suggest finding the real problem before the solution.

Ok, thanks. I’m not using the mediasoup-demo, I’m using a custom web chat app that someone else wrote. I have the full source and will start diving in, but the author of the app provided no documentation (and almost no comments in the code) so I’m a little “behind” and trying to figure this all out. (Perhaps he based the signaling parts on the mediasoup-demo app.)

I think I am going to get a “crash course” on mediasoup and WebRTC today. :wink:

Here’s a question that is right for this group: how important would it be for me to upgrade to mediasoup v3 from v2? It looks like the API isn’t directly compatible so I would need to do some refactoring/restructuring of my code to support v3.

Thank you.

Strongly recommended to move to v3. It’s terribly better and we are putting lot of love into it.

1 Like