Skip to content

Conversation

@hoyo1744
Copy link

Summary

Add DNS fallback feature to improve client resilience during DNS server outages.

JIRA

https://issues.apache.org/jira/browse/ZOOKEEPER-5014

Changes

  • Add zookeeper.client.dnsFallback.enabled option (default: false)
  • Cache resolved IP addresses in StaticHostProvider
  • Use cached IP when DNS resolution fails (if enabled)

Testing

  • Added unit tests for DNS fallback scenarios

Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

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

I reject this patch. We've removed any sort of DNS caching from ZooKeeper previously. The DNS infrastructure already has in-built caching at many levels: DNS servers, operating systems, etc. all have caching enabled. DNS also supports multiple primary and secondary servers for high availability. Anything we add to ZooKeeper would be just confusing.

@hoyo1744
Copy link
Author

Thank you for reviewing my PR and for the clear explanation.

I understand your reasoning. DNS infrastructure already provides caching at multiple levels (DNS servers, OS, etc.) and supports high availability through primary/secondary servers. Adding another caching layer in ZooKeeper would add unnecessary complexity.

I learned a lot from this contribution process - analyzing the ZooKeeper codebase, understanding the design decisions, and going through the Apache contribution workflow.

Thank you for your time and feedback!

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