Coder Social home page Coder Social logo

Comments (4)

armon avatar armon commented on June 18, 2024

Agreed 👍

from memberlist.

slackpad avatar slackpad commented on June 18, 2024

Looking at https://golang.org/src/net/dnsclient_unix.go#L162, Go's built-in DNS client already does the right thing and asks over TCP if the UDP response is truncated. I'll do a little extra sanity checking but I think we might be done here! Adding SRV support would be a nice addition.

from memberlist.

slackpad avatar slackpad commented on June 18, 2024

Confirmed the behavior, if you set up the Consul agent to report truncation properly then the Go DNS client will use TCP and pull the full list:

{
        "dns_config": {
                "enable_truncate": true
        }
}

This kind of sucks though because we only really want this behavior for joining, it's not good in general to turn on truncation, especially with Consul's DNS where you only care about the first few because they are shuffled.

from memberlist.

slackpad avatar slackpad commented on June 18, 2024

Got a PR up for review. I decided against doing a SRV lookup because there's some ambiguity about port numbers because we have multiple gossip pools so this could lead to some confusion about which one we want to connect to. This keeps the current behavior of using the port if supplied, but otherwise using the configured port.

from memberlist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.