DNS Is for People – Not for IT Infrastructure

(louwrentius.com)

27 points | by louwrentius 5 hours ago

14 comments

  • XYen0n 1 minute ago
    DNS is merely one implementation of service discovery; even without DNS, some other form of service discovery would still be needed.
  • necovek 1 hour ago
    It is not really true that DNS is for people only: it is used as an aliasing system, for load balancing, and for caching (with no cache invalidation mechanism other than ahead-of-time TTL setting).

    It is used to make entire protocols work (MX records for email, but SRV records are used for much more).

    Now, if we do look at the most basic of basic DNS roles — mapping a human readable name to arbitrary set of numbers identifying a machine on the network — we should consider how do we avoid some of the issues while keeping all of the benefits of DNS.

    Eg. if we indeed "materialize" machine identifiers, we lose the ability to do virtual hosting (domains not passed in) or fix a problem with just a DNS update (eg. treating load-balancing machines like cattle).

    The author jumps immediately to, arguably, ill advised materialization techniques like /etc/hosts, without considering all that DNS does for a complex, real world system and what goes missing.

    • louwrentius 27 minutes ago
      - note I was talking about internal infrastructure, not public services

      - DNS load balancing is not that important for internal services in most Cases? Would only use it if alternatives won’t work.

      - the virtual host issue is really adressed by /etc/hosts, I thought that was obvious, I now regret not explicitly adressing it.

      • necovek 20 minutes ago
        The examples you cite (eg. 2021 Facebook outage) have nothing to do with DNS being used for internal infrastructure.

        In the other example (Amazon DynamoDB issue), the problem is with dynamically choosing from a large dynamic pool of IP addresses for a service — DNS is but one mechanism to do it. If it wasn't DNS, it could have been something else that did that job that was broken. Even /etc/hosts if it was updated with an empty record.

        What I am saying is that your analysis is not defining the problem you want solved exactly, your examples are not backing up your proposal or analysis, and you are ignoring all the things DNS does both for public and private infrastructure. You seem to have some intuition about this adding complexity and thus being a risk (which is true), but you need to do a better job of connecting and analysing real risks and proposed solutions (and their comparative performance).

  • gfody 1 hour ago
    > we'll just use /etc/hosts no DNS required!

    this is classic "easy vs. simple" folly, witness how someone too lazy to [learn how to] setup proper DNS for their infrastructure will do 10x the work hacking something "easy"

    • qmr 8 minutes ago
      Set up. You set up your setup.
    • louwrentius 25 minutes ago
      Serious response: how is templating out /etc/hosts with Ansible not 10x simpler than setting up an additional service that only introduces additional risk?
      • arter45 2 minutes ago
        You lose the concept of DNS forwarding. Usually, if your company has example.com, your DNS server is authoritative for example.com, which means it will actually contain (fqdn,ip) entries belonging to example.com, and it will forward requests for other domains to other DNS servers, possibly one DNS server per domain.

        If you remove DNS servers from the equation, you need to write down records for other domains, too. This means you have to chase every domain for changes in CDN configuration, hosting provider or ISP migrations, IPv4 to v6 migrations and so on.

        You don't have PTR records, which means you can't find out a name from its IP address.

        You also miss other features of DNS, like SRV, MX and so on.

        More subtly, you lose the ability to control DNS resolution over systems you can't control. If a DNS server says host.example.com is 192.168.0.4, a Windows desktop, a Linux server and your toaster will agree on that (especially if no local cache is enabled, but even then TTLs apply). If for some reason you cannot control a particular machine, you will never get it to consider that new DNS record. This can happen for a lot of reasons.

  • Bratmon 3 hours ago
    > Instead of configuring domain names that may not resolve, we can just directly inject the appropriate IP address(ess) into configuration files

    Because now you've replaced one single point of failure configuration system with caching and TTLs (DNS) with a higher maintenance and much less widely supported one.

    • bot403 1 hour ago
      Not to mention losing load balancing and failover.
      • dzr0001 46 minutes ago
        And making TLS more difficult, especially for HA systems. Guess you would just need one cert for 127.0.0.1 for all local services.
        • louwrentius 21 minutes ago
          Certs support ip addresses? However, /etc/hosts would solve the issue probably, unless I’m missing something
  • jaredhallen 1 hour ago
    Seems like a weird crusade. Pointing everything directly at the IP address might not seem so swell when it's time to upgrade the server or the address has to change for some reason. Sure would be nice to just update the DNS record to point to the new address.
    • themafia 1 hour ago
      > or the address has to change for some reason

      One annoying reason is you don't own it/have access through the owner anymore.

      > Sure would be nice to just update the DNS record to point to the new address.

      EC2. Elastic IPs are easy enough, but, precisely, I would just like to make a Route53 alias for an EC2 instance and not even have to care.

    • louwrentius 23 minutes ago
      Proposed solution: update the inventory and run your Ansible playbook/role agains your infrastructure (or subset). I don’t see the issue, to be frank.
  • irjustin 20 minutes ago
    Hard disagree - only because if you didn't have DNS you would have something else in its place. But, we understand DNS _very_ well.

    People, services, machines, etc need to "dial" canonical-somewhere. Whatever does the canonical management is the piece that when it breaks everything breaks.

    Doesn't matter if it's DNS, EIP rotation, some HA proxy, whatever. It'll break.

    It's actually that DNS is so well understood that it doesn't fail more often.

    So no, DNS is for IT Infra.

  • fulafel 33 minutes ago
    History tip: Using /etc/hosts (or as it was called then, "the HOSTS.TXT file") ran into some problems.
    • qmr 7 minutes ago
      Bah storage is cheap these days and we have git let's give it another go
  • mixdup 2 hours ago
    "just use /etc/hosts" is wild. That is effectively just going from one DNS server servicing all of your machines to having bespoke DNS servers individually running on every host. madness
    • louwrentius 20 minutes ago
      Why is that madness and not amazing? Isn’t the simplicity beautiful? Managing /etc/hosts with a tool like Ansible?
  • samrus 1 hour ago
    But whats the problem woth using DNS internally? Given the system is already present, and moving away fron it would be effort. Seems like a nitpick
  • linksnapzz 3 hours ago
    Counterpoint: DNS isn't used enough; consider replacing sssd/AD with Hesiod.
  • denkmoon 1 hour ago
    This is what happens when you take the "it was DNS" meme too seriously. DNS is brilliant. Learn it. If you're really that ideologically opposed to such brilliance, just use the addresses directly. The system described is insane.
  • jghefner 1 hour ago
    > It's easy to configure systems with tools like Ansible or pyinfra at scale.

    Tell me that you've never used Ansible at scale without telling me that you've never used Ansible at scale.

    • louwrentius 17 minutes ago
      Tell me please what the problem is exactly
  • themafia 1 hour ago
    > The case against DNS for internal IT infrastructure

    In SOHO settings I might actually agree, but, this is where I think site administered and distributed multicast DNS was a missed opportunity.