Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added configuration to disable dns using TransportConnector #3245

Open
llchry opened this issue May 15, 2024 · 4 comments
Open

Added configuration to disable dns using TransportConnector #3245

llchry opened this issue May 15, 2024 · 4 comments
Assignees
Labels
for/user-attention This issue needs user attention (feedback, rework, etc...) status/need-feedback type/enhancement A general enhancement

Comments

@llchry
Copy link

llchry commented May 15, 2024

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 llchry added status/need-triage A new issue that still need to be evaluated as a whole type/enhancement A general enhancement labels May 15, 2024
@violetagg
Copy link
Member

violetagg commented May 15, 2024

@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)

@violetagg violetagg self-assigned this May 15, 2024
@violetagg violetagg added for/user-attention This issue needs user attention (feedback, rework, etc...) and removed status/need-triage A new issue that still need to be evaluated as a whole labels May 15, 2024
Copy link

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
Copy link
Author

llchry commented May 24, 2024

@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.

Copy link

github-actions bot commented Jun 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for/user-attention This issue needs user attention (feedback, rework, etc...) status/need-feedback type/enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants