UDP transport not working

I am having a lot of trouble setting up phoenix app, which uses both TCP and UDP.

This is how the [[services]] section looks like:

  http_checks = []
  internal_port = 4000
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
    hard_limit = 1000
    soft_limit = 1000
    type = "connections"

    force_https = true
    handlers = ["http"]
    port = 80

    handlers = ["tls", "http"]
    port = 443

    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

  internal_port = 50000
  protocol = "udp"

    port = 50000

I allocated dedicated IPv4 address for the app,
I am also successfully binding to the fly-global-services address:

/ # netstat -ulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
udp        0      0 fly-global-services:52896*                           
udp        0      0 fly-global-services:51393*                           
udp        0      0 fly-global-services:50000* 

However, the UDP is working very unreliably. When launching and deploying new app, it
takes a lot of time for the UDP traffic to be enabled (usually at least 10-20 minutes after launching new app). Until that happens UDP is not forwarded to the container (tcpdump shows nothing).
Once UDP packets start to be forwarded it remains that way throught the following deployments.

The moment UDP starts flowing doesn’t seem to be triggered by any particular event.

I wonder what is the cause of this, whether it is expected that UDP isn’t immediately forwarded after the first port is opened and if the separate [[services]] entry for UDP is at all needed.

Thanks for any help on this topic!


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