Skip to content

[LI-CHERRY-PICK] use_all_dns_ips as default value for client.dns.lookup - #348

Merged
ZIDAZ merged 1 commit into
2.4-lifrom
default_use_all_dns_ips
Jun 3, 2022
Merged

[LI-CHERRY-PICK] use_all_dns_ips as default value for client.dns.lookup#348
ZIDAZ merged 1 commit into
2.4-lifrom
default_use_all_dns_ips

Conversation

@ZIDAZ

@ZIDAZ ZIDAZ commented Jun 3, 2022

Copy link
Copy Markdown

In order to reduce connection failure rates by using all the possible IP addresses of a hostname instead of just using the first one, change the default value of client.dns.lookup configuration in AdminClientConfig, ProducerConfig and ConsumerConfig, as well as server, tool and test code from "default" to "use_all_dns_ips".

To achieve the old behavior of using the first resolved IP, explicitly set the value of client.dns.lookup configuration to "default".

Backport the change from KIP-602 apache#8644, which is already used in 3.0-li

Committer Checklist (excluded from commit message)

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

@ZIDAZ
ZIDAZ requested review from fluffywei and kehuum June 3, 2022 18:56

@kehuum kehuum left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

thanks for the patch!

@ZIDAZ
ZIDAZ merged commit 418c679 into 2.4-li Jun 3, 2022
@ZIDAZ
ZIDAZ deleted the default_use_all_dns_ips branch June 3, 2022 22:28
@ZIDAZ ZIDAZ mentioned this pull request Jun 3, 2022
3 tasks
ZIDAZ pushed a commit that referenced this pull request Jun 6, 2022
* [LI-HOTFIX] Do not resolve bootstrap server during client bootstrap/startup (#315)

* do not resolve bootstrap server during client bootstrap/startup

Co-authored-by: Ke Hu <kehu@kehu-mn2.linkedin.biz>

* [LI-HOTFIX] use_all_dns_ips as default value for client.dns.lookup (#348)

* [LI-HOTFIX] log level change to avoid flooding the logs

* [LI-HOTFIX] Ignore the failed test ClusterConnectionStatesTest#testMultipleIPsWithUseAll (#116)

TICKET = N/A
LI_DESCRIPTION = The test fails since the domain kafka.apache.org used to return 3 IPs and is now
only returning two IPs. Furthermore, the upstream fix identified below cannot be cleanly cherry
picked.
EXIT_CRITERIA = when the commit 131d475 is picked from upstream:
KAFKA-12193: Re-resolve IPs after a client disconnects apache#9902

* [LI-HOTFIX] Ignoring the failed tests (#188)

TICKET = N/A
LI_DESCRIPTION = Several tests are failing since the domain kafka.apache.org that used to resolve to more than 1 IPv4 addresses are not only resolving to 1 IPv4 address.
The upstream code has overhauled the ClusterConnectionStatesTest. We are simply ignoring these tests for now, and will get the new logic from upstream after a major version rebase.
EXIT_CRITERIA = This hotfix can be removed in the next major version rebase

Co-authored-by: Ke Hu <kehu@linkedin.com>
Co-authored-by: Ke Hu <kehu@kehu-mn2.linkedin.biz>
Co-authored-by: Lucas Wang <luwang@linkedin.com>
@ZIDAZ ZIDAZ changed the title use_all_dns_ips as default value for client.dns.lookup [LI-HOTFIX] use_all_dns_ips as default value for client.dns.lookup Jun 6, 2022
@ZIDAZ ZIDAZ changed the title [LI-HOTFIX] use_all_dns_ips as default value for client.dns.lookup [LI-CHERRY-PICK] use_all_dns_ips as default value for client.dns.lookup Jun 7, 2022
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