eclipse-vertx / vert.x

Vert.x is a tool-kit for building reactive applications on the JVM
http://vertx.io
Other
14.2k stars 2.05k forks source link

Support DNS over TCP with retry #4493

Open jacobhampel opened 1 year ago

jacobhampel commented 1 year ago

This is a follow up on #4309

I think the problem was not completely resolved.

When the DNS server answers with the flag truncated but does not deliver any results the DNS client should retry using TCP.

When I'm looking at the current test it only tests that the DNS client can handle a DNS response with the truncated flag set and one result.

Would it be possible to add this additional functionality.

That would be very helpful.

I'm not a Netty expert but it seams to be fixed already there.

The desired behavior would be

  1. DNS client tries to resolve the hostname via UDP (default)
  2. DNS server answers with no results but the truncated flag is set
  3. DNS client retries to resolve the hostname via TCP
  4. DNS server answers with results

Unfortunately, I'm not an expert in netty and therefore unable to fix it myself.

If any additional feedback is required I'm more than happy to help here.

Vertx version: 4.3.2

vietj commented 10 months ago

can you provide a reproducer project for this ?

vietj commented 10 months ago

it might be indeed a Netty defect

jacobhampel commented 10 months ago

I do not have a reproducer project for this, yet.

I don't know how Vertx is using Netty for the DNS resolution, but this might have been solved for Netty. https://github.com/netty/netty/pull/9139