Fly.io + UDP

I've got an membrane_webrtc server setup where someone can "call" an LLM and talk with them (audio only, no video). It largely works, though my users are reporting random disconnects. The console errors match the attached image. I'm a little thrown since the
url
in that message specifies UDP as the transport. I deployed to fly.io, and explicitly did not open up the UDP ports in my fly.toml, so I'm wondering why the app is failing with a UDP timeout. Am I incorrect in assuming that I can force all traffic over TCP by just not opening it up? Shoudl I also figure out UDP?

On UDP, I read through this: https://github.com/fishjam-dev/fishjam-docs/blob/main/docs/deploying/fly_io.md

But it's Fishjam specific, and it doesn't line up neatly with my app which is based on the old membrane video room repo (https://github.com/membraneframework-labs/membrane_videoroom). Where does fly-global-services get specified in that case? I'm not explicitly setting a TURN_LISTEN_IP. I traced through things I think it could be here in turn_ip (and then the turn_mock_ip is my external IPv4 address)

    turn_mock_ip = Application.fetch_env!(:smartvox, :integrated_turn_ip)
    turn_ip = 'fly-global-services'
    #turn_ip = {0, 0, 0, 0} #prior value

    integrated_turn_options = [
      ip: turn_ip,
      mock_ip: turn_mock_ip,
      ports_range: Application.fetch_env!(:smartvox, :integrated_turn_port_range),
      cert_file: turn_cert_file
    ]

Which is in my room.ex -- those options are used here:
TURNManager.ensure_tcp_turn_launched(integrated_turn_options, port: tcp_turn_port)


But that throws an error when I override turn_ip that way.

So, (1) does that console error suggest I should be looking into why UDP is failing and (2) any tips on trying to configure UDP on Fly.io specifically?
image_1.png
GitHub
Fishjam documentation. Contribute to fishjam-dev/fishjam-docs development by creating an account on GitHub.
Was this page helpful?