Check out a free preview of the full Full Stack for Front End Engineers course:
The "DNS Caches" Lesson is part of the full, Full Stack for Front End Engineers course featured in this preview video. Here's what you'd learn in this lesson:

Jem reviews the concept of DNS caches and the different types of DNS caches that help speed looking up of domains.

Get Unlimited Access Now

Transcript from the "DNS Caches" Lesson

[00:00:00]
>> Jem Young: DNS, the best way to think of it is just it's a phone book. But you have caches everywhere because say you go to google.com. You don't want to keep looking that up every time. You don't have to resolve that to whatever the IP address every single time.

[00:00:13] So you have a local cache. That's on your computer. And then on your router somewhere, you likely have another cache there which says, okay, these are commonly used IP addresses that you know and love. So it speeds up that look up time. Then your ISP has another cache.

[00:00:30] And then that's essentially how DNS works. It's just caches on caches on caches on caches. You always want to make the shortest hop possible. So popular sites, Netflix, Google, Facebook, FrontendMasters, they're probably on your local ISP cache. So when your computer says, hey I want to go look something up, it doesn't have to go far.

[00:00:47] It cuts down on latency. Whereas if you ever noticed, I don't know, go to a Russian site or a Chinese site, the DNS resolution probably takes a long time. Because the server has to say, is it on my local cache? No. Is it on my network cache? No.

[00:01:02] ISP? No. And it keeps going up, going up, going up. And there's core backbones that have maps to every single IP address in the world. Billions and billions and billions of addresses. But by the time you get that high, you're pretty far off. You're in New York or San Francisco, or some of the core hubs, where everything is, so we always capture everything.

[00:01:23] And what's fun about DNS is that they're always talking to each other. They're constantly updating. It's just this flow of data that we never think about taking place. But obviously, when you build a domain today, all the DNS has to update. So I wonder if you point your domains, say, Ilovecats.xyz, you point that to an IP address.

[00:01:42] Around the world, all these servers are suddenly updating. And it's just so cool to think about. These things are happening in real time, and we just don't think about all this complexity that's happening. So yeah.
>> Speaker 2: Quick question.
>> Jem Young: Yes.
>> Speaker 2: They're wondering if we're gonna be covering the A record, CNAME, MX, and other record types today.

[00:02:00]
>> Jem Young: Absolutely. We're gonna cover A record and CNAME, probably not gonna go into MX, but, great question, Henry M. Yes, we will cover that later. Unfortunately, not unfortunately, we're going in steps, in that, you have to understand one part before I hook up another part. Because I don't want to just tell you to do something and you're just blinding trusting me.

[00:02:19] I want you to understand it first. And then we're going to put it all together. But, great question, Henry. Is there any other record? Yes, dying DNS that was the thing they attacked, so a week before the Internet we all learned a little bit something on how fragile everything is.

[00:02:36] But, you have your local area network cache so there's probably one here ISP cache. And there's a lot of caches