Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thevilledev
Copy link
Collaborator

@thevilledev thevilledev commented Nov 24, 2025

1. Why is this pull request needed and what does it do?

Based on the discussion from #7704 (review) with @rdrozhdzh

In #7704 we fixed a busy loop error by coupling upstream connection errors with a shared counter called fails. This counter collides with healthchecks and the max_fails parameter, and it might have unintended side effects.

This change replaces that implementation with an optional per-request counter. It is limited by the new max_connect_attempts parameter. By default this is set to 0, maintaining the legacy behaviour and thus keeping it backwards-compatible. Updates tests and plugin docs.

2. Which issues (if any) are related?

See #7723 for potential next steps to change the default behaviour.

3. Which documentation changes (if any) need to be made?

Plugin docs updated.

4. Does this introduce a backward incompatible change or deprecation?

Once merged, the default behaviour is back to where it was. The default value is set to 0 and using this new parameter is opt-in.

In coredns#7704 we fixed a busy loop error by coupling upstream connection
errors with a shared counter. This counter collides with healthchecks
and the max_fails parameter, and it might have unintended side
effects.

This change replaces that implementation with an optional per-request
counter. It is limited by the new max_connect_attempts parameter.
By default this is set to 0, maintaining the legacy behaviour and
thus keeping it backwards-compatible. Updates tests and plugin docs.

Signed-off-by: Ville Vesilehto <[email protected]>
@thevilledev thevilledev force-pushed the feat/forward-max-connect-attempts branch from 71ce4fc to 74fd2f1 Compare November 24, 2025 20:14
@yongtang yongtang merged commit c2894d4 into coredns:master Dec 2, 2025
11 checks passed
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.

2 participants