Welcome to the fifteenth edition of The Catch Block!
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.
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.
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
- Introducing dotnet-monitor, an experimental tool (Sourabh Shirhatti)
Quality Reads
- Let’s Build a Financial Dashboard with React (TJ VanToll)
- 7 Things to Enjoy in MAUI (Sam Basu) - The .NET Multi-platform App UI is going to be a big deal.
- Program The Game Of Life With C# and Emojis (Khalid Abuhakmeh) - This is already implemented in Blazor Games.
- Creating a Repeater component with Blazor (Gérald Barré)
- 3+1 ways to manage state in your Blazor application (Jon Hilton)
- Reduce mental energy with C# 9 (Dave Brock)
- A Guide To Migrating From ASP.NET MVC to Razor Pages (Khalid Abuhakmeh)
- Worker Service in .NET Core 3.1 (Shahed Chowdhuri)
Catch Up with the Previous Issue!
Thanks for reading, and we'll see you next week!