Skip to content

KAFKA-15817: Avoid reconnecting to the same IP address (#14813)#14980

Merged
cadonna merged 1 commit intoapache:3.6from
cadonna:cherry-pick_KAFKA-15817_to_3.6
Jan 4, 2024
Merged

KAFKA-15817: Avoid reconnecting to the same IP address (#14813)#14980
cadonna merged 1 commit intoapache:3.6from
cadonna:cherry-pick_KAFKA-15817_to_3.6

Conversation

@cadonna
Copy link
Copy Markdown
Member

@cadonna cadonna commented Dec 11, 2023

If multiple addresses are available. This change is a follow-up to #9902. When re-resolving DNS after disconnecting, it is possible (likely, even) that we will resolve the same set of addresses in the same order, meaning we could attempt to reconnect to the same IP that we just disconnected from. In the case where we disconnected from the IP address because it has become unhealthy (due to a load balancer going down or a network routing layer restarting, for example), the client will need to time out before connecting to the next IP. This essentially unifies the behavior before and after KAFKA-12193: re-resolve after disconnecting while still progressing through the IP list.

Cherry-pick of 47e3777

Reviewers: Lucas Brutschy [email protected], Andrew Schofield [email protected]

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.

Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

If multiple addresses are available. This change is a follow-up to apache#9902. When re-resolving DNS after disconnecting, it is possible (likely, even) that we will resolve the same set of addresses in the same order, meaning we could attempt to reconnect to the same IP that we just disconnected from. In the case where we disconnected from the IP address because it has become unhealthy (due to a load balancer going down or a network routing layer restarting, for example), the client will need to time out before connecting to the next IP. This essentially unifies the behavior before and after KAFKA-12193: re-resolve after disconnecting while still progressing through the IP list.

Reviewers: Lucas Brutschy <[email protected]>, Andrew Schofield <[email protected]>
@lucasbru lucasbru self-requested a review December 11, 2023 08:18
@cadonna
Copy link
Copy Markdown
Member Author

cadonna commented Jan 4, 2024

Failed tests are unrelated.

@cadonna cadonna merged commit ab92edd into apache:3.6 Jan 4, 2024
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.

3 participants