Skip to content

Netty HTTP client blocking on DNS resolution #3629

@yanns

Description

@yanns

Describe the bug

Netty threads are being blocked when calling InetAddress.getByName (https://docs.oracle.com/javase/6/docs/api/java/net/InetAddress.html#getByName(java.lang.String))

Screenshot 2022-12-15 at 14 43 28

This impacts the scalability of the AWS java library.

Expected Behavior

Netty threads should not be blocked

Current Behavior

Netty threads are being blocked

Reproduction Steps

Using the NettyNioAsyncHttpClient

  val builder = NettyNioAsyncHttpClient.builder()
  val httpClient: SdkAsyncHttpClient = builder.build()

Possible Solution

A possible solution is to use netty-resolver-dns like in https://github.com/netty/netty/blob/4.1/example/src/main/java/io/netty/example/dns/tcp/TcpDnsClient.java

Additional Information/Context

No response

AWS Java SDK version used

2.18.35

JDK version used

17.0.5_8

Operating System and version

linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p3This is a minor priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions