UDP Service is not reachable

Trying to deploy an UDP service but it’s not reachable.

I have the config file defined here: https://github.com/fuji246/multisend/blob/master/sender/fly.toml

And also changed the code according to bind “fly-global-services” instead of “0.0.0.0”, see https://github.com/fuji246/multisend/blob/master/sender/saturatr.cc#L31.

And I use dockerfile to deploy the service: https://github.com/fuji246/multisend/blob/master/sender/Dockerfile

Another question is about the performance of UDP service, the service I deployed is to measure cellular network performance, so the delay is very important, in the doc it mentioned:

We use :zap:eBPF magic :zap: to shuttle UDP packets across our forwarding fabric (I wrote that because it sounds cool) while transparently mapping source addresses.

Will that have any impact?

Thanks in advance!

You can deploy a simpler udp app to see if it works (here). If so, something might need changing in the code you’re trying to deploy. I don’t do much c but from one cursory look at your code, things look okay to me, so no clue why it wouldn’t work.

You might know this already but a reminder that udp doesn’t work over IPv6 (docs).

Btw, if you’re deploying Apps v2 (Machines), then test if udp over IPv6 on FLY_PUBLIC_IP assigned to the VM works (make sure to listen on [::]:<port> instead of fly-global-services:<port>).

1 Like

Thanks for the help, I’ve tried to deploy the udp echo but seems not working either, I use iperf udp mode and send udp packets, and capture the packets, I don’t see any response from server.

I’m using the same configure here: Running Fly.io Apps On UDP and TCP · Fly Docs, and allocate ipv4 address:

$ fly ips allocate-v4

VERSION IP TYPE REGION CREATED AT
v4 137.66.32.141 public global 8s ago

And the iperf command “iperf -c 137.66.32.141 -p 5000 -u -b1m -i 1”, and from tcpdump, I see only outgoing traffic on port 5000

$ sudo tcpdump -i eth0 udp port 5000
tcpdump: verbose output suppressed, use -v[v]… for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
14:45:38.023405 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 76
14:45:38.027853 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.035878 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.047632 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.059267 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.071239 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.082487 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.094137 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.106051 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.117847 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.129486 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.141469 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.153407 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.165267 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470
14:45:38.176943 IP penguin.lxd.35527 > 137.66.32.141.5000: UDP, length 1470

Its the MTU.

This works from my debian:

# 1300 mtu
iperf -c 137.66.32.141 -p 5000 -u -b1m -i 1 -l 1300

# nc
echo -n "hello world" | nc -4u -w1 137.66.32.141 5000
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.