I’m experiencing DNS resolution failures between my Fly.io applications, preventing NGINX from connecting to my backend service. Here are the key details:
Apps Involved
NGINX Proxy
App: x-realestate
Region: ams
Configuration: [nginx.prod.cd1.conf](pastebin link if available)
Express Backend
App: x-realestate-server
Region: ams
Port: 8000 (confirmed listening on 0.0.0.0)
Issue
x-realestate-server.internal fails to resolve from the NGINX app:
dig x-realestate-server.internal
;; status: NXDOMAIN # No DNS record found
Fly.io’s DNS (fdaa::3) responds but returns no answer.
Symptoms:
NGINX cannot proxy requests to the backend.
Fly.io health checks fall back to port 8080 (undesired).
Debugging Steps Taken
Verified both apps are in the same org:
fly status -a x-realestate-server
fly status -a x-realestate
Confirmed backend is running:
fly logs -a x-realestate-server | grep "Listening on"
# Output: Listening on 0.0.0.0:8000
Tested DNS from NGINX container:
nslookup x-realestate-server.internal
# Error: "Can't find x-realestate-server.internal: No answer"
Your app x-realestate-server does not seem to have a running machine. Machines that are not currently running will not be returned as part of responses to .internal queries.
If what you are looking for is to have x-realestate-server automatically started when x-realestate requests it, please note that this is only possible if you send requests through our proxy, and .internal addresses are explicitly not routed through our proxy. To have internally-routable proxied addresses, see Flycast.
Also, your fly.toml contains depends_on with .internal addresses. That is not a supported configuration.
2025-06-23T04:50:41Z [error] x-realestate-client.flycast could not be resolved (3: Host not found)
2025-06-23T07:05:23Z [error] nslookup: couldn't get address for '[fdaa::3]': not found
Odd Behavior:
.flycast hostnames fail resolution despite being Fly.io’s official internal DNS
Their own resolver [fdaa::3] sometimes fails lookup commands
Forum Post Suggestion:
“Internal DNS resolution intermittently fails for .flycast domains and [fdaa::3] resolver in AMS region”
2. Connection Reset Quirk
Evidence:
2025-06-23T07:05:23Z [error] Recv failure: Connection reset by peer
curl: (56) Recv failure: Connection reset by peer
Pattern:
Occurs when curling between services via IPv6
Despite services listening on correct ports (netstat confirms)
3. Health Check False Positives
Evidence:
2025-06-23T07:05:22Z [error] Health check failed (port 8080)
2025-06-23T07:05:22Z [notice] Nginx started successfully
Inconsistency:
Health checks fail despite Nginx being fully operational
Occurs during VM startup sequence
Broken Internal DNS
x-realestate-client.flycast could not be resolved (3: Host not found)
nslookup: couldn't get address for '[fdaa::3]'
Fly’s internal DNS system is failing in AMS region.
TCP Connection Resets:
Recv failure: Connection reset by peer (56)
Occurs on all IPv6 connections between services. Health Check Flapping:
Health check failed → Nginx started successfully → Health check passed
Monitoring system isn’t synced with service readiness.
Application Insights
Services Are Healthy:
Both client and server respond via public URLs
Issues are purely network-layer
Cold Start Behavior:
Machine started in 1.119s → Health check failed → Became reachable in 1.235s
Any Helper response will be appreciated. its not working.