i’m working on a streaming application which is being hosted on fly.io machine. I have exposed the needed ips in my Dockerfile and configured fly.toml file to have the port ranges. I’ve also allocated a shared public IP address to the app, yet the port ranges exposed are not available, as a result, webrtc connections from the client are being cancelled.
Could someone perhaps point me in the right direction what I may be doing wrong?
@khuezy Setting the handlers = ["udp"] returns this deployment error.
Failed to update machines: failed to update machine 3dxxxx: failed to update VM 3dxxxx: Services [1] Ports [0] Handlers must be one of: tls, pg_tls, http, proxy_proto, edge_http…
Looks like handlers can only be of the specified types.
On the Fly.io platform, the internal port has to exactly match the external port for UDP, so it’s really unclear that a range would work.
The UDP side of your app needs to bind to the same port that is used externally. Fly will not rewrite the port; Fly only rewrites the IP address for UDP packets.
E.g., a packet that came in for port 30543 on the Anycast address would (at most) be forwarded by the edge node kernel’s eBPF (hereafter referred to as “magic”) to port 30543 on your internal machine.
But I don’t see any indication that it would honor this configuration syntax.
How about starting with a simpler case—and then working upwards in complexity?
Even the near-minimal UDP example that @khuezy linked to has given a lot of people trouble, at first…
I saw this Your app needs to bind to the fly-global-services address, any idea how to bind to fly-global-services? Can’t seem to find this as part of environment variables.