Welcome to the fifteenth edition of The Catch Block!

Fifteenth birthday cake
Celebrating our quinceañera! Kind of. Photo by Hanna Pedroza / Unsplash

In this edition: Domain Name Servers, the Game of Life with Emojis, time-to-live, MAUI, a financial dashboard with React, and state in Blazor.

The Wonder of Domain Name Servers (DNS)

As you know by now, I've spent a lot of time over the past several weeks making BlazorGames.net. You'll be hearing a lot more about the content of this site in the upcoming weeks, so I won't rehash that now. Rather, I'd like to talk about something that took a surprisingly while during the site setup process and why it takes so long to propagate.

Yep, I'm talking about DNS.

Am I looking horizontally, or vertically? I can't tell. Photo by Ian Battaglia / Unsplash

DNS (Domain Name Servers) is the backbone of the Internet. It is the system by which human-usable domain names are translated into IP addresses.

According to Cloudflare (and I would suspect they would know), there are four kinds of nameservers, and eight steps involved in each DNS lookup. That's a lot of work that needs to be done on every single domain lookup, and so most DNS servers cache this lookup information (domain name -> IP address) with a time-to-live (TTL) value, which means that a particular domain can be routed to the corresponding IP address more quickly.

It's a bit tricky to answer how many of these DNS servers exist. Often, you'll see the number 13 when searching for that info, but that's not entirely correct.

Even Google has this wrong. Kind of.

There are 13 clusters of name servers, named "a" through "m". Each are owned by various organizations, including ICANN, the University of Southern California, the US Department of Defense, VeriSign Inc. (which has two!), and NASA.

The main thing that bothered me when setting up my new domain was how long it took before the DNS system was able to properly map the domain name. Most articles I read recommended waiting 48 hours (and I've seen a few recommend 72 hours) to ensure propagation, but that seemed unnecessarily long to me. Why does this take so long?

Turns out, it often doesn't take that long; many times DNS propagation will only take a few hours. But to answer the question directly, DNS propagation takes that long because of those TTL values mentioned earlier. These values are measured in seconds, and the most commonly used values include 86400 seconds (24 hours) and 172800 seconds (48 hours). The DNS will not update until the currently-cached TTL records expire.

When I set up BlazorGames, the DNS propagation took nearly 48 hours. This seemed inordinately long to me, but I assume it was because that's how long the TTL needed to get to all the DNS clusters around the world. I wish there was a way to speed this up, but given that I'm not setting up new domains every day, it's a price I'll have to pay for the time being.

Previews and Announcements

Quality Reads

Catch Up with the Previous Issue!

The Catch Block #14: Web Live Preview, Async, Nesting, Money, and Validation
Plus React, IO containers, time management, and a new .NET 5.0 preview.

Thanks for reading, and we'll see you next week!