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 on0.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"
- Checked Fly.io network:
fly ips list -a x-realestate-server
# IPv6: fdaa:0:ac95:a7b:3f8:ad38:f036:2
Request
- Is there a known issue with
.internal
DNS resolution inams
? - How can I force Fly.io to register the DNS record for
x-realestate-server.internal
? - Fallback options? (e.g., hardcoding IPs in NGINX).
Logs & Configs: