Reactor-netty: Add DNS resolver observer, and options for client

Created on 30 Nov 2018  路  3Comments  路  Source: reactor/reactor-netty

We should be able to provide TcpClient options for DNS resolution in addition to custom resolver as in #501 :

  • DNS resolution timeout
  • DNS positive/negative TTL
  • [?] Internal cache eviction period
  • doOnResolvedAddress
typenhancement

Most helpful comment

It would indeed be very handy to be able to fine-tune some of the DNS resolution settings!

In addition to the points listed above, I would suggest adding the ability to "manually" evict from the internal cache. For example, some content delivery networks recommend to re-resolve DNS on certain types of status codes (e.g. 500 internal server error). Client code could build simple logic around such error cases and force DNS re-resolution on subsequent attempts of the same request.

All 3 comments

It would indeed be very handy to be able to fine-tune some of the DNS resolution settings!

In addition to the points listed above, I would suggest adding the ability to "manually" evict from the internal cache. For example, some content delivery networks recommend to re-resolve DNS on certain types of status codes (e.g. 500 internal server error). Client code could build simple logic around such error cases and force DNS re-resolution on subsequent attempts of the same request.

Reactor Netty now uses Netty DNS Resolver #1252

Thanks for looking into this @violetagg !

Was this page helpful?
0 / 5 - 0 ratings