reactor / reactor-netty

TCP/HTTP/UDP/QUIC client/server with Reactor over Netty

Home Page:https://projectreactor.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Added configuration to disable dns using TransportConnector

llchry opened this issue · comments

Motivation

Now Netty will bind a udp port when new DNSNameResolver, when using TransportConnector.connect method, it will trigger a new port binding. However, during actual connection, the system determines whether parsing is required and then connects to the corresponding address.

if (!resolver.isSupported(remoteAddress) || resolver.isResolved(remoteAddress)) {

Desired solution

Is it possible to provide a configuration similar to a switch to disable DNS functionality?

Considered alternatives

Hope some suggestions.

Additional context

The Netty PR:
DnsNameResolver: Allways call bind() during bootstrap #13817

@llchry Please elaborate more on the topic.

Reactor Netty by default runs with only one DNS resolver so you should have only once this binding. Do you observe something different?

When one provides a custom DNS resolver, we always recommend that this resolver is shared.

If you need completely to disable the DNS resolver, you can configure the HttpClient like this:

HttpClient.resolver(NoopAddressResolverGroup.INSTANCE)

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@llchry Please elaborate more on the topic.

Reactor Netty by default runs with only one DNS resolver so you should have only once this binding. Do you observe something different?

When one provides a custom DNS resolver, we always recommend that this resolver is shared.

If you need completely to disable the DNS resolver, you can configure the HttpClient like this:

HttpClient.resolver(NoopAddressResolverGroup.INSTANCE)

What I observed is that there is one DnsNameResolver per thread, so there will be more than ten listeners in the http service.

I try to solve it in this way, thank you very much.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open.