Hi guys! It's Angela from the App Brewery. 1
And in this lesson, we're going to deep dive into how exactly does the Internet actually work. 2
Because here's the thing that we use every single day and we completely take it for granted. 3
So before we start developing awesome websites and web apps for people to access through the Internet, 4
it's really important that we understand the fundamentals of how the Internet actually works. 5
So what exactly is the Internet? 6
Well, a lot of people think of it as a cloud. 7
Something that's hanging around in the sky. It's super complex; super difficult to understand, but actually 8
that's not it at all. 9
The Internet is really simple. 10
All it is is just a long piece of wire. 11
And the wire connects different computers to each other. 12
So you might have one computer that's in Seattle and another computer that's in London. And they can 13
talk to each other and transfer data through this giant wire. 14
Now some of these computers attached to the internet have a very special job. 15
They have to be online 24/7, ready to serve you all of the data and the files that you are requesting 16
when you try to access websites. And the computers that are doing that job, we would call a server. And 17
the computers that any user would use to access the internet is called a client. 18
Now you can imagine a web server as a giant library that's open 24/7. And you can go in there at any 19
hour of the day and request "I want to see Google's home page" or "I want to see the latest post on Tech 20
Crunch". And it would be up to serve you with all of the files and data that you would need to be able 21
to view whatever website it is that you requested. 22
Now you can imagine if there's a library that's big enough to house all of these websites. then it's 23
going to be pretty difficult to quickly locate the thing that you want out of this giant library, 24
right? 25
So how is this problem solved on the Internet? 26
Well, let's say that you're sitting at home on your computer and you type in google.com because you 27
want to head over to the main Google home page. 28
What happens behind the scenes is that your browser will send a message to your Internet service provider. 29
So these are the people who you pay to be able to access the Internet. 30
And if you're in the US, that's a company like AT&T or Comcast. And if you're in the U.K. then that would 31
be something like BT or TalkTalk. 32
Now the message that you're sending the ISP is "I want to see google.com". And the ISP will then relay 33
that message to something called a DNS server - a domain name system server. And a DNS server is essentially 34
just a souped up phone book. 35
And what happens when you make that request through your browser is the DNS server will look up in its 36
database as to what is the exact IP address of that website that you're trying to access. And every 37
single computer that's connected to the internet has an IP address. 38
This is like a postal address for your computer. So that when people need to send and receive files on 39
the Internet, each computer can be located by a unique IP address. 40
And once that DNS server finds the IP address, it sends that back to your browser. 41
So now you know the exact address where you can find the Google home page. 42
So, the next thing that happens, is you will send a direct request to that address through your Internet 43
service provider. 44
And this message will be delivered via what's called the Internet backbone. 45
Now, the Internet backbone isn't some sort of analogy for some clever programming. 46
It's literally the backbone of the Internet. 47
And if you had a submarinecablemap.com, you can view all of the underwater cables that power the 48
Internet. And the Internet is made up of these huge sprawling masses of wires, connecting all of the world's 49
Internet users. As you can imagine 50
it's a pretty complex world out there. 51
Now, if I'm sitting in London and I want to see a website that's hosted in the United States, then my 52
browser would have to make a request that goes through one of these cables under the Atlantic Ocean 53
in order to reach the United States. 54
And once that computers receive my request, they'll send back all of the relevant data. Again, through 55
these giant cables. And to navigate all of this crazy underwater and above water wires, 56
all I have is an IP address. 57
It's like as if I'm sending a letter halfway across the world and my only hope for my letter to reach 58
my friend is that postal address on the front of the envelope. 59
So, once I've gotten the IP address of the website that I want to access, then my browser sends another 60
message through the Internet service provider via the Internet backbone to the server that is located 61
at that address 216.58.210.46. And the computer that's located at that address is of course the 62
Google server. And on this server, there's all of the files I would need in order to be able to view the 63
Google home page. 64
So, the server then sends all of those files back to me through the Internet backbone and I get to see 65
the Google home page in my browser. And all of that happens in a matter of milliseconds. 66
And just to imagine the journey that my data has gone on, travelling through the world thousands of times 67
per day. 68
So, why don't you give it a go? 69
Open up your browser and type in 216.58.210.46 and hit enter to see the Google home page being 70
served up to you being served up to you through the Internet.