Skip to content

feat(config): Opt-out of DNS cache#5700

Merged
jjbayer merged 2 commits intomasterfrom
feat/http-dns-cache
Mar 6, 2026
Merged

feat(config): Opt-out of DNS cache#5700
jjbayer merged 2 commits intomasterfrom
feat/http-dns-cache

Conversation

@jjbayer
Copy link
Member

@jjbayer jjbayer commented Mar 6, 2026

Add a config option to disable DNS caching.

DNS caching is "important for K8s infrastructure" (see #2164), but in self-hosted it could have the side effect of caching a negative lookup result when the web container is removed while the relay container keeps running.

ref: getsentry/sentry#109002

@jjbayer jjbayer marked this pull request as ready for review March 6, 2026 12:04
@jjbayer jjbayer requested a review from a team as a code owner March 6, 2026 12:04
Copy link
Member

@Dav1dde Dav1dde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a fine change, but I am not convinced this is going to solve the self hosted problems.

It's very likely that during the first health check Relay has not yet authed and that's why the error message shows up. Maybe we should suppress it, but it doesn't change that the first health check from Kuberentes/docker(-compose) is likely going to fail.

@jjbayer
Copy link
Member Author

jjbayer commented Mar 6, 2026

I am not convinced this is going to solve the self hosted problems.

It's very likely that during the first health check Relay has not yet authed and that's why the error message shows up.

Initial health check failures are fine, but some users report more persistent problems. Specifically, this is the one that could be explained by a DNS caching problem IMO:

Web Logs: No incoming requests from the relay IP were registered at all.
As I could not find any tool in the relay container to check if it could connect to "http://web:9000/" I added a temporary busybox container to the compose file and tried from there, proving that the internal Docker networking worked (this also showed up with the Docker internal IP of the busybox container as caller_ip in the web logs).

It's worth a try, let's see.

@jjbayer jjbayer added this pull request to the merge queue Mar 6, 2026
Merged via the queue into master with commit 30f9b6c Mar 6, 2026
30 checks passed
@jjbayer jjbayer deleted the feat/http-dns-cache branch March 6, 2026 12:47
@max-wittig
Copy link
Contributor

Thank you for your efforts here to fix this long standing problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants