Non-blocking DNS resolution
fwbrasil opened this issue · comments
Is your feature request related to a problem? Please describe.
We use DNS at Nubank to resolve names and the blocking behavior of the DNS resolution is a problem for one of our services that distributes requests to several other services. It often has a large number of threads doing DNS resolution and that contributes to CPU throttling. Example:
Describe the solution you'd like
Finagle should support non-blocking DNS resolution by default or by configuration.
Describe alternatives you've considered
We can use the service loading mechanism introduced by e9e2239 and have a separate implementation but I it'd be great if Finagle had this feature built in.
Additional context
I worked on an async DNS resolver as part of the fiber scheduler project (see earlier phab versions, I think I removed it eventually when the kafka client wasn't a problem anymore). It'd be great if it could be open sourced.
we have created a ticket to look into it, we'll reach out to you when we have updates. thanks!
Hey @fwbrasil, I'm working on it. I have a draft phab that I'm testing internally at the moment.
awesome news folks! Thank you very much :)
It took us a while but it's landed! ca456b8
It's behind a toggle if you want to enable it for your apps. Will do more testing internally before enabling it by default.
nice! this is going to be very helpful, thank you!!!
@vkostyukov are there plans to make a new release with this change?
Yea, this should make it into the July release.
Update: We do publish snapshots nightly, maybe you want to try depending on them in the meantime?