Repository navigation
fix(self-hosted): override dns ttl in kong config to avoid wrong routing - #47846
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Kong service in Docker Compose adds ChangesKong DNS cache configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Braintrust eval report
|
- extends: supabase#6017 - follows the same pattern as: supabase/supabase#47846
I have read the CONTRIBUTING.md file.
YES
What kind of change does this PR introduce?
Kong caches resolved upstream IPs for the DNS record TTL, which Docker returns as 600s. When a backing container restarts onto a new IP, Kong keeps routing to the stale IP for up to 10 minutes - and if the old IP is reused by another service, requests get cross-wired (e.g. Studio serves PostgREST's OpenAPI).
Override the TTL to 5s, matching the current Envoy gateway's
dns_refresh_rate.Note: while a useful mitigation, a more complete improvement would require adding active healthchecks and changing Kong's configuration to use upstreams (not planned at this point as the API gateway default will become Envoy soon).
Summary by CodeRabbit