Fix 502 errors during Fly.io proxy deploys
The health check returned 200 immediately on nginx start, before Tailscale connected. Fly.io routed traffic to the new machine with a cold proxy cache and no MagicDNS, causing upstream DNS timeouts. Defer the health check by returning 503 until a sentinel file (/tmp/tailscale-ready) is created after Tailscale connects. This keeps the old machine serving traffic during the startup window. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3415cad38c
commit
b667f21e10
3 changed files with 9 additions and 4 deletions
1
docs/changelog.d/fix-deploy-healthcheck-race.bugfix.md
Normal file
1
docs/changelog.d/fix-deploy-healthcheck-race.bugfix.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Fix 502 errors during Fly.io proxy deploys by deferring health check until Tailscale is connected.
|
||||
Loading…
Add table
Add a link
Reference in a new issue