Skip to content

DNS lookups should not block the event loop #1724

@n-miles

Description

@n-miles

The Problem

The default name resolver for AHC is:

new DefaultNameResolver(ImmediateEventExecutor.INSTANCE)

This does DNS lookups by using the calling thread (a Netty event loop thread) to do a blocking DNS lookup via the OS mechanism. This is a bad default behavior.

Proposed Solution

I propose that we move the blocking DNS lookups into a separate event loop. There does not appear to be a resolver in Netty that will do this, so we would likely need to create one.

Thoughts?

I am willing to do the development for this if we want this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions