Skip to content

DNSResolver objects churn on transient requests without a session #10847

@bdraco

Description

@bdraco

Describe the bug

A single DNSResolver object is designed to handle an unlimited number of requests at a time. We should not be making multiple ones of them. https://c-ares.org/docs.html


  /* Initialize channel to run queries, a single channel can accept unlimited
   * queries */
  if (ares_init_options(&channel, &options, optmask) != ARES_SUCCESS) {
    printf("c-ares initialization issue\n");
    return 1;
  }

To Reproduce

Make requests without session

Expected behavior

A single DNSResolver is shared between all requests

Logs/tracebacks

n/a

Python Version

n/a

aiohttp Version

$ python -m pip show aiohttp

multidict Version

$ python -m pip show multidict

propcache Version

$ python -m pip show propcache

yarl Version

$ python -m pip show yarl

OS

linux

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions