Code Monkey home page Code Monkey logo

Comments (14)

htuch avatar htuch commented on May 25, 2024 1

@mattklein123 Any objections to changing the DnsResolver::resolve() return type to ActiveDnsQuery* from ActiveDnsQuery&? If a DNS query is resolved immediately during the call to ares_gethostbyname(), and hence the callback has already been invoked, we don't have any cancellation to return to the caller.

Also, I'm thinking in the initial implementation we can keep it relatively simple and use a single ares_channel per query. This comes at some tail latency cost, as you can't share DNS server TCP connections or have the ability to persist them, but it makes it somewhat easier to marry the select-oriented event model in c-ares with libevent.

from envoy.

mattklein123 avatar mattklein123 commented on May 25, 2024

Yeah, and the API interface for getaddrinfo_a() is also terrible.

In my mind this is related to #125. AFAIK evdns is not considered production grade and it doesn't have SRV support. I think it would be better to start depending on a resolver library such as https://c-ares.haxx.se/ (though I haven't done that much research) and then we can get rid of getaddrinfo_a() and get SRV resolver support at the same time.

from envoy.

PiotrSikora avatar PiotrSikora commented on May 25, 2024

C-ares might be indeed a better choice, I just didn't want to suggest yet another dependency.

from envoy.

mattklein123 avatar mattklein123 commented on May 25, 2024

I've had multiple people ask for SRV support at this point, so I think we will do this relatively soon (potentially via non-Lyft contribution).

from envoy.

vanillahsu avatar vanillahsu commented on May 25, 2024

getaddrinfo_a() is linux only api, it's terrible when I like to port envoy to FreeBSD.

from envoy.

PiotrSikora avatar PiotrSikora commented on May 25, 2024

@mattklein123 you mentioned that this might be contributed from outside of Lyft. Do you know status of this effort? Is anyone actively working on this?

from envoy.

mattklein123 avatar mattklein123 commented on May 25, 2024

@PiotrSikora no one is currently working on this. If you want to take this, that would be great. It's all yours. Let me know.

from envoy.

PiotrSikora avatar PiotrSikora commented on May 25, 2024

@mattklein123 please consider this being worked on (not by me, but someone else at Google).

from envoy.

mattklein123 avatar mattklein123 commented on May 25, 2024

OK great, thanks. LMK if there are any questions/issues. The interface that needs to be implemented is pretty straightforward.

from envoy.

htuch avatar htuch commented on May 25, 2024

@mattklein123 I'll be working on this as a Google contributor, will reach out if any questions arise.

from envoy.

mattklein123 avatar mattklein123 commented on May 25, 2024

@htuch re: return value sgtm

re: ares implementation, tbh I don't know anything about the c_ares API, I did enough research to determine that seemed like the library to use but that's about it, so what you are proposing sounds fine to me.

from envoy.

mattklein123 avatar mattklein123 commented on May 25, 2024

fixed thanks @htuch !

from envoy.

mattklein123 avatar mattklein123 commented on May 25, 2024

not done yet

from envoy.

mattklein123 avatar mattklein123 commented on May 25, 2024

Change deployed to canary at Lyft and looks good so far so closing this out.

from envoy.

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.