a collection of my projects and thoughts as I wade through #devbootcamp

How the Internet Works

Do you really know?

25.01.2015

When I started writing this post about how the internet works, I couldn't help but get an image of George W. Bush talking about "rumors on the internets". But really, I was no clearer on what the internet was. Here's a quick summary of what the internet actually is and how it works.

Data (files, images, videos, websites, programs, etc.) are strored in computers. Each computer has its own address. If you want to send these data to another computer, then you break down the data into small packets. When the data packets are sent, they are labeled with the addresses of the computer they are sent from and the they are sent to. These packets then travel through a network.
A network is 2 or more computers that are interacting with each other. In order to interact with each other, they use protocols. Protocols are a set of rules that the computers agree to use for data sharaing. So, the labeled data packets travel from computer to computer on a network, following protocols, until they arrive at the computer they are addressed to. Once all the packets arrive, they are reassembled and can be read by that computer.

For example, when you stream a YouTube video, the video is strored in a YouTube computer. That computer is sending your computer small packets of that video, which you get to see as they arrive. (That's why you get buffering! The packets aren't coming as fast as the song is playing.)

However, not all computers are created equal. The YouTube computer that is sending you the video is called a server. Servers are computers whose sole purpose is to store the information that people are looking for. Your computer is called a client. Clients are computers meant to access information from different servers. And finally, there are computers called nodes. Nodes are the computers the data travels through to get from the server to the client. The video you streamed didn't come directly from YouTube's server to your computer. It traveled through many computers in between. Data can travel from node to node through physical lines (eg. cables) or wireless signals (4G).

So how do servers know what to send you? Protocols! When you type in/click on a URL, you are using the Hypertext Transfer Protocol, (the fancy name for HTTP). When your type/click the domain name, (http://www.youtube.com), your internet provider sends a request to look for that server using the Internet Protocol (IP) address. Once the request arrives that server, it selects the data you requested, and sends it in a series of packets small enough to travel quickly through the network, right back to your computer's IP address. When they all arrive they are reassembled using, you guessed it, another protocol.


Return to list of blog posts.