Skip to content

Read up on DNS resolution behavior: c-ares + /etc/hosts #582

@jgehrcke

Description

@jgehrcke

We've speculated that IMEX daemons use canonical glibc functions for DNS name resolution. But we didn't quite know. I was prepared for some well-known difficulties to affect our system in that regard. Especially with respect to how /etc/hosts is interpreted and also with respect to caching, these glibc functions behave in particular ways.

Now we understand that IMEX daemons use grpc built against c-ares (and this applies). That is actually good news.

As we start relying on /etc/hosts, it's crucial to be in know of how exactly c-ares specifies and implements incorporating /etc/hosts/ into its DNS resolution methodology.

We may be able to make smart usage of specific behavior and features. It's really an entirely different code path and behavior-in-the-details than using anything-glibc.

Some inspiration from c-ares' changelog and commits:

Localhost resolution can fail if only one address family is in /etc/hosts PR #947

Fix /etc/hosts processing performance

c-ares/c-ares@a36317

Metadata

Metadata

Assignees

Labels

robustnessissue/pr: edge cases & fault tolerance

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions