Hi, I have a UDP app deployed on appsv1 that works great, but when deployed to appsv2/machines, the UDP responses seem inconsistent.
For testing, I’ve deployed echo servers with AppsV2, Machines, and also to an app that I still have on AppsV1
I’m using https://github.com/fly-apps/udp-echo- as the server for testing, and the command echo -n Response{1..100} | xargs -d ' ' --verbose -I {} bash -c 'echo -n {} | nc -w1 -u ip port; echo'
to test echo responses
These are my results from tests that I’ve done from both home and from Google Cloud Shell, to rule out ISP issues.
Responses received/sent from echo server:
(Raw logs here: Fly UDP issues · GitHub)
AppsV1/Home: 100/100
AppsV2/Home: 55/100
AppsV2/Cloudshell: 22/100
Machine/Home: 0/100
Machine/Cloudshell: 33/100
Also, the echo server machines that I deployed to other regions doesn’t seem to be responding either.
AppsV2 was deployed using https://github.com/fly-apps/udp-echo-
Terraform config for the Machine deployment:
terraform {
required_providers {
fly = {
source = "fly-apps/fly"
version = "0.0.20"
}
}
}
provider "fly" {
useinternaltunnel = true
internaltunnelorg = "pmtest"
internaltunnelregion = "iad"
}
resource "fly_app" "serverApp" {
name = "udp-test"
org = "pmtest"
}
resource "fly_ip" "serverIp" {
app = fly_app.serverApp.name
type = "v4"
depends_on = [fly_app.serverApp]
}
resource "fly_machine" "serverMachine" {
for_each = {
1 = "iad",
2 = "lax",
3 = "dfw"
}
app = fly_app.serverApp.name
region = each.value
name = "server-${each.key}"
image = "brandon15811/udpechotest:latest" # Built from https://github.com/fly-apps/udp-echo-
services = [{
ports = [
{
port = 1000 * (each.key + 1)
},
]
protocol = "udp"
internal_port = 1000 * (each.key + 1)
}]
env = {
ECHO_PORT = 1000 * (each.key + 1)
}
cpus = 1
cputype = "shared"
memorymb = 1024
depends_on = [fly_app.serverApp]
}
output "machine_details" {
value = {
machines = {
for machine in fly_machine.serverMachine : machine.name => {
starting_port = machine.services[0].ports[0].port,
id = machine.id
public_ip = fly_ip.serverIp.address
}
}
}
}
Terraform output:
machine_details = {
"machines" = {
"server-1" = {
"id" = "1781327c90ed08"
"public_ip" = "137.66.38.64"
"starting_port" = 2000
}
"server-2" = {
"id" = "4d891d77be6678"
"public_ip" = "137.66.38.64"
"starting_port" = 3000
}
"server-3" = {
"id" = "32874ed7ae3685"
"public_ip" = "137.66.38.64"
"starting_port" = 4000
}
}
}