Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2965

prevent DNS queries spam

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • c client
    • None

    Description

      Hello,

      First of all, some context about the issue and why it became quite apparent to me:

      • I'm using the native zookeeper client on linux
      • I'm not declaring -DTHREADED
      • My zookeeper ensemble is made of server names that need to be resolved
      • The ensemble and DNS servers are "next" to each other
      • My client is "far" and uses an unreliable network path that can drop UDP requests

      For each run in client's main loop, all servers in ensemble are resolved, even if no change in servers list occurred (zookeeper_interest .. update_addrs .. resolve_hosts).
      In my situation, DNS requests could timeout and would trigger a reconnection to ensemble.

      Please find attached a patch that would prevent DNS queries when hostname was not changed.

      Best regards,

      Attachments

        1. 0001-Prevent-DNS-queries-spam.patch
          4 kB
          Philippe Serreault

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            SBAM Philippe Serreault

            Dates

              Created:
              Updated:

              Slack

                Issue deployment