InfrastructureLesson 2 of 48 min

The domain, and the plumbing under it

Four separate things that everybody assumes are one thing, with four separate ways to fail.

Your address looks like one purchase. It is four arrangements with up to four different companies, each with its own account, its own bill and its own way of going wrong.

What happens when somebody types your name
  1. The registrar
    Who you rent the name from. You never own a domain; you hold it until a renewal date.
  2. DNS
    The directory that turns the name into an address. Answers are cached all over the world, which is why changes are not instant.
  3. The host
    The machine or platform that actually answers at that address and serves your app.
  4. The certificate
    What makes it https rather than a browser warning. Usually issued and renewed for you, silently, until it is not.

Changes are slow for a reason. Every DNS answer carries a time to live, and until it expires, resolvers keep serving the old answer from cache. Lower the time to live a day before a planned move and raise it afterwards. This is the same caching idea from the shipping course, wearing different clothes: "it works for me" is often somebody holding a fresher answer than you.

Sounds like a name problem

  • The site is unreachable, no error page at all
  • It works on your phone but not your laptop
  • It started exactly when a record changed
  • A browser warning about the certificate

Sounds like an app problem

  • The page loads, then something on it fails
  • Everyone sees the same thing at the same time
  • It started exactly when you deployed
  • The host dashboard is showing errors

Who do I pay for my domain, and what date does it renew?

A surprising number of people cannot answer either half, which means nobody is watching the one date that turns everything else off at once.

What to remember

  • Registrar, DNS, host and certificate are four things with four failure modes.
  • DNS changes are slow because answers are cached until their time to live expires.
  • Losing the domain takes down a perfectly healthy app, and is slow to undo.

Terms in this lesson

Show field notes toggles a search param the loader reads. With it off, the slow promise is never created, so nothing streams.