HYWCT: Internet

This is the third part of the four part series: How Your Website Comes Together. You’ve already learned about the code that goes into making a website and the servers that hold that code. Now it’s time to learn about the internet. Without the internet, the world wouldn’t even function like we know it today. That’s why it doesn’t hurt to know a bit about how it really works.

What the internet is

The internet is what makes the online world possible. At the core, the internet is just a giant network of computers that communicate with each other. That’s really all it is. The internet is a way to connect computers and make sure that they stay connected.

How the internet works

There are numerous ways you can connect computers to make them communicate with each other. You can use Bluetooth, Wi-Fi, or even an ethernet cord. That will create a network between those computer. The best part is that you can add more connections to this network. You can add as many computers as you want to. What keeps the computers easy to identify is their IP address.
The IP address is a unique identifier for a computer. Whenever your computer is connected to Wi-Fi or any other kind of network, it gets assigned an IP address. That’s how you are able to find any website online. The servers that the websites are hosted on have their own IP addresses. We usually don’t have to remember an IP address, but we do know the domain name for the website or computer we want to connect to.
Once have the domain name that you want to go to, a request is sent through the internet using the HTTP protocol. This protocol is what allows browsers and servers to communicate with each other over the internet. When someone types in the URL to go to your website, they are sending an HTTP request to the server to load the files they need to see the website.
The HTTP request is a temporary connection between the client and the server. After the server has responded to the client’s request, the connection is closed. Every time a new HTTP request is made, a new connection has to be made. This helps prevent security risks like the wrong person having access to the information being sent through a continuous connection.

Below the surface

Now you need to know what happens on the server when it receives an HTTP request. The next layer is the TCP layer. This is how HTTP requests get sent to the right location on the server. The TCP layer takes the HTTP request and breaks it up into different chunks and adds its own information to each chunk.
Then the chunks of data are sent to the right port number on the server based on the information added to it in the TCP layer. Port numbers are used to route the data to the right parts of the computer. That’s how you are able to look up stuff on Google and read your email at the same time. Those two applications use different ports on the computer.
You’ll usually hear TCP/IP because the two complement each other. An IP address is there just as an address. It doesn’t care how the data is handled, but TCP does. TCP makes sure that all of the chunks of data in an HTTP request are received in the right order and that they are sent to the right locations.
It might seem like overkill to have all of these different layers and protocols, but they are the backbone of what we know as the internet. Without all of these in place, the internet wouldn’t be as easy to use. Data would be received at the wrong time which would lead to bad HTTP requests and a lot of 404 errors. We would probably even need to memorize IP addresses and they all look similar to this: 109.435.424.42 Of course we could do it, but it would limit the amount of knowledge accessible online.
As a web developer you will probably never go deeper than HTTP requests. The TCP/IP stuff and all of the networking isn’t really under the scope of a web developer. It’s one of those things that it’s good to know about just in case the issue really is at that level. Web developers need to understand more than just the code even if they don’t become experts in anything else. It helps to be aware of the behind the scenes details.
This is just a brief overview of how the internet works and a little of the details behind it. Did you know the internet and the world wide web aren’t the same? Just a little something I want to leave you with. 🙂 This was part three of the four part series which means there’s only one more part left! The last part of this series will go over some maintenance concerns for your website and give you some tips on how to make the process more efficient.
Good news everyone! I’ve been doing some surveys to figure out what this month’s webinar should be about and we have a winner!
On Feb. 24, I’ll be doing a webinar on how to get your first junior dev job. If you’re interested, you can click here to register.

Link: https://dev.to//flippedcoding/hywct-internet-31bj