2 ms·
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
by charcircuit 1y 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 1y ago> 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/systemd-resolved.service.html 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).
- charcircuit 1y agoWell from the blogpost it looks like calling it via glibc does extra work than just querying the service.
- kelnos 1y agoNot 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.