Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(patches): revert "[backport -> release/3.2.x] fix(balancer): respect max retries (#12346)" #12498

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

tzssangglass
Copy link
Member

Reverts #12372

This PR introduces a minor behavioral change: when Nginx retrieves a connection from the keepalive pool and finds it broken during its use, it will add retry until it has exhausted all the connections in the keepalive pool and attempts to establish a new connection with the upstream server in the next retry round. From Nginx's perspective, retrying on a broken connection is not considered a real retry. This is also the default behavior of Kong.

This PR modifies this behavior by treating the retry on a broken connection as a valid retry and, at most, retrieving 5 (default) connections from the keepalive pool. If all of them are broken, the system will stop retrying, even if there are still connections available in the keepalive pool. It will also not attempt to establish a new connection with the upstream server. Although this is a very rare case, to maintain consistency in behavior, we believe it is necessary to be more cautious.

Therefore, we intend to adopt a difficult but correct fix: addressing the issue regarding statistics.

@bungle bungle merged commit 905637c into release/3.2.x Feb 2, 2024
25 checks passed
@bungle bungle deleted the revert-12372-backport-12346-to-release/3.2.x branch February 2, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants