In Ruby, there's a library called
This is a drop-in replacement (moneky patch) of libc DNS resolver Ruby's using under the hood. It'll use a pure Ruby implementation called
The doc states the merit of
Resolv as "Resolv can handle multiple DNS requests concurrently without blocking the entire Ruby interpreter". So ppl probably reach out to this when they want to improve the performance.
You can read how
resolv-replace is patching a set of Ruby's stdlibc network calls at https://ruby-doc.org/stdlib-2.7.0/libdoc/resolv-replace/rdoc/index.html.
If you'd like more control on the DNS layer due to how your app's constructed, I'd recommend checking out this library.