Remix.run Logo
charcircuit 3 days ago

Why isn't DNS in a service on the operating system instead of libc? You'll want requests to be locally cache anyways. This also makes it easier to just abandon a RPC instead of stopping a thread you don't control.

cesarb 3 days ago | parent [-]

> Why isn't DNS in a service on the operating system instead of libc?

On modern Linux systems, it is: systemd-resolved (https://www.freedesktop.org/software/systemd/man/latest/syst...) is a system service which can be queried through RPC (using dbus or varlink), through the traditional glibc APIs (using a NSS plugin), or even by being queried on the loopback interface as if it were a normal recursive DNS server (for compatibility with software which bypasses glibc and does direct DNS queries).

kelnos 3 days ago | parent | next [-]

Not sure how standard that is, though. E.g. on Debian systemd-resolved isn't even installed by default, let alone enabled and set up as the default resolver.

charcircuit 3 days ago | parent | prev [-]

Well from the blogpost it looks like calling it via glibc does extra work than just querying the service.