Throughout my entire life I have had a better time understanding how things worked if I could peek under the cover and watch it in action. I started taking things apart when I was two years old, and began to put them back together when I was five. I was around nine years old when I began to limit myself to things that were broken. Mostly.
WHEN WE GO TO YOUTUBE.COM, WE START A SERIES OF TASKS THAT DEPENDS ON INTERNET INFRASTRUCTURE. DON’T WORRY, I WON’T BORE YOU WITH DRY DICTIONARY-ESQUE DEFINITIONS OR PROVIDE A BUNCH OF DISTRACTING LINKS.
I do recommend Wikipedia: they are spot-on with this terminology. For this blog post we will assume all of the routers and paths work correctly. The first thing that must happen is the computer must have an address, except it’s been given a name. Computers use numbers: only humans use names. When we give our browser a name, it must find an address (number) to go to. The computer uses the DNS system to find an address. DNS is like a phone book: look up a name, get a number. This has to happen quickly, or “the internet is slow”.
Each and every device on the internet has a unique address called an IP address. There are 4,294,967,296 total ip addresses out there, but almost all of them are used. The new system has 340,282,366,920,938,463,463,374,607,431,768,211,456 ip addresses. Three points to the person that can pronounce that number.
How about names? The entire name cannot be more than 256 characters long and is composed of lower case a-z, 0-9, and a hyphen (-). The total possible combination of names is: 7,788,245,576,201,841,665,227,675,288,295,967,981,049,465,429,882,009,414,779,256,810,415,681,440,755,567,097,824,572 ,647,758,948,426,775,830,935,614,253,233,712,425,657,853,021,528,782,440,251,124,366,980,641,722,860,087,353,676,794, 894,161,860,812,309,412,527,821,135,301,125,846,983,730,848,255,104,628,054,356,352,216,541,705,414,621,779,385,494, 278,526,353,660,159,463,679,796,874,186,619,925,987,472,647,240,147,884,793,299,426,937,163,171,072,378,794,153,676, 219,890,022,799,554,315,418,599,925,723,168,193,819,992,671,717,293, give-or-take. Can anyone pronounce this number?
So, we enter “www.youtube.com” into our brower. The computer’s configuration already contains a link to a dns server, so the computer sends its query there. If the dns server doesn’t know the answer, it queries the registrar for the authoritative name server. When the authoritative name server replies with the ip address, the computer may connect directly with www.youtube.com. As an added bonus, each dns server that was queried also keeps a copy in its cache to speed things along for the next query.
- Where is youtube.com
- DNS server checks markmonitor registrar for dns authority server
- Markmonitor returns domain server address to ISP
- ISP DNS server requests name from youtube DNS authority server
- DNS authority server returns IP address for youtube.com
- ISP a DNS server returns IP address to client
- Client computer makes first connection to youtube.com
- YouTube server responds to client computer with data
Once we have the address, our browser can then connect to the youtube server. Oh, but wait: what if there are photos, and other items linked on the page to other sites? For each of those, the entire process must be started over.
The Internet dns system doesn’t really translate well to plumbing: the faucet in my bathtub doesn’t need to know which upstream pump will actually deliver the water. Instead, I look at the dns system as part of the piping itself: if dns isn’t configured correctly, data doesn’t flow. Exactly as if a pipe stopped working.
What other kinds of problems might affect our use of the internet? How about congestion? Back to the plumbing analogy: the pipe feeding our house can fill a bathtub pretty quickly. But not while watering the garden, or running the washing machine. If you are in the shower, and someone flushes a toilet, the water from the shower head becomes a trickle. (In Sit-coms, this is hilarious.) If your housemate begins a 50 gigabit download while you are playing World of Warcraft online, it’s not long until you need to have their head on a platter. You can pay to have a larger water pipe run to your house, just like you can to have a larger internet connection.