Open in app
Cover art for How the internet moves data in layers

How the internet moves data in layers

Technology · 5 min listen

Get the app on mobile
Download on the App Store Get it on Google Play
Cover art for How the internet moves data in layers
0:00
0:00
Transcript

HostMost of us think of the internet as just one big thing. You click a link, and a page pops up. But under the hood, it's more like a huge team of people who never meet, each doing one tiny job and passing a box to the next person. How do all these parts actually talk to each other without making a huge mess?

GuestWell, the easiest way to see it's to think about sending a letter. When you write a note to a friend, you don't think about how the truck drives or how the plane flies. You just write the words, put it in an envelope, and stick a stamp on it. The internet works the exact same way. It breaks the big job of moving data into a stack of smaller jobs. We call these layers. Each layer only cares about its own task. The top layer is what you see, like your web browser. It just says, hey, I want to show this photo. It doesn't know anything about wires or radio waves. It just hands that photo to the layer below it and says, you handle the rest.

HostBut that seems like a lot of extra work. If I want to send a photo, why can I not just send the photo? Why do I need a whole team of middle men to pass it down a chain?

GuestBecause if you did it all in one go, the whole system would break the moment you changed one thing. Imagine if your web browser had to be built specifically for your exact brand of home router and your specific phone company. If you went to a coffee shop and used their Wi-Fi, your browser would stop working because the wires changed. By using layers, we keep the jobs separate. The top layer handles the app. The middle layer handles the address and making sure the pieces get there in the right order. The bottom layer handles the actual physical stuff, like the light in a fiber optic cable or the electricity in a copper wire. Because they're separate, you can swap out the bottom layer, like switching from a plug-in cable to Wi-Fi, and the top layer never even notices. It just keeps asking for photos.

HostOkay, but if we're wrapping the data in all these different layers, like putting an envelope inside a bigger envelope, does that not make the web much slower? It feels like we're adding a lot of bulk to every single thing we send.

GuestIt does add a little bit of extra data, which we call overhead, but it's the only way to make sure the data actually gets where it's going. Think about what happens if a tiny piece of that photo gets lost. On a big, messy web of millions of computers, stuff goes missing all the time. If we didn't have these layers, your computer would've no way to know that bit number forty-two never showed up. One of the middle layers has the specific job of counting the pieces as they go out and making sure the same number of pieces come in on the other side. If one is missing, that layer just asks for that one tiny piece again. Without that layer, you would just get a broken photo, and the app would've no idea why.

HostI still find it hard to grasp why they have to be so blind to each other. It feels like the system would be smarter if the layer at the bottom knew what it was carrying. Why keep them in the dark?

GuestBeing in the dark is actually the superpower of the internet. It's what makes it grow. If the wires at the bottom had to understand that they were carrying a video or an email, we would've to build a new kind of wire every time someone invented a new app. Instead, the wire just sees bits, ones and zeros. It doesn't care what they mean. This means you can invent a brand new way to talk to people tomorrow, and the internet will just work. You don't have to ask the people who lay the cables for permission. You just build your new top layer, and it sits right on top of the old stack. It's that wall between the jobs that lets the web change so fast.

HostSo when I hit send, my data is basically getting dressed up in a bunch of different coats, and then it gets stripped back down one by one when it reaches the other side?

GuestThat's a great way to put it. When you send something, it goes down the stack. Each layer wraps the data in its own box of info. The delivery layer adds the house number. The safety layer adds a checklist to make sure nothing breaks. By the time it hits the wire, it's just a long string of pulses. Then, the computer on the other end does the reverse. It looks at the bottom coat, sees it's for him, and takes it off. Then it looks at the next coat, checks that no pieces are missing, and takes that off. By the time it hits the screen of your friend, all those coats are gone, and it's just the photo you sent.

HostThe most amazing part of this whole thing is that the wires at the bottom have no clue if they're carrying a love letter or a bank trade.

GuestThat simple click on a screen works only because a whole stack of silent workers are busy handing off envelopes in the dark.

Made with Wander

A world of curiosity you can listen to. Explore endless questions, or ask your own.

Get the app