Hey 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 work? 2
So what exactly is the Internet? 3
A lot of people think it's a cloud, something that's hanging around in the sky, 4
it's super complex, super difficult to understand, but actually, that's not it at all. 5
The Internet is pretty simple. 6
All it is is just a long piece of wire, 7
and wire connects different computers to each other. 8
So you might have one computer that's in London and another one that's in Seattle, and they can talk 9
to each other and transfer data through this giant wire. 10
Now, some of these computers attached the Internet have a very special job, 11
they have to be online 24/7, ready to serve you all the data and files that you are requesting 12
when you try to access a website, 13
and these are called servers. 14
And what they do is they serve you all the data and files you need to be able to access and interact 15
with certain websites. 16
So these computers are called Servers, and any computer that a user would use to access the Internet 17
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 19
at any hour of the day and say, I want to see Google's home page or I want to see the latest posts 20
on TechCrunch and would be able to serve you with all the files and data you would need to be able to 21
view whatever website you want. 22
Now, as you can imagine, if there's a library that's big enough to house all of these websites, then 23
it's 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
Well, what happens behind the scenes, is that your browser will send that message to your ISP or your 29
Internet service provider. 30
So these are the people who you pay to be able to access the Internet. 31
If you live in the US, that will be AT&T or Comcast, 32
and if you're in the UK, that would be something like BT or TalkTalk. 33
Now the message that you're sending the ISP is I want to see google.com and the ISP will then relay 34
that message to something called a DNS server, which stands for a Domain Name System Server. 35
And a DNS server is essentially just a souped up phone book. 36
And what happens when you make that request through your browser is the DNS server will look up in its 37
database to find the exact IP address of that website that you're trying to access. 38
And every single computer that's connected to the Internet has an IP address. 39
It's kind of like a postal code for your computer so that when people need to send and receive files 40
on the Internet, each computer can be located and contacted using their unique IP address. 41
And once the DNS server finds that IP address, it will send it back to your browser through the ISP, 42
over the internet, 43
then you can make a direct request to that address. 44
And what lives at that IP address is of course the Google servers, and they'll be able to send you 45
back all the files and data you need to be able to view the Google home page. 46
Now you can try this for yourself to look up the IP address of the Google home page. Head over to this 47
website, nslookup.io and type in google.com and they should show you the exact IP address of the Google 48
servers that you can access. 49
So if you copy it and paste it into a new tab, then you'll be able to replicate that process and see 50
the Google home page show up. 51
So to summarize, the Internet is just a bunch of wires that connects up different computers, but it's 52
just on a much bigger scale, connecting up all the computers in the world. 53
But what about the oceans? 54
I hear you ask. 55
Well, that's one of the coolest things. 56
There are these massive undersea cables connecting all the continents on Earth. 57
And if you head over to submarinecablemap.com, you can see all of these cables and see the ones 58
that connect you up to the Internet. 59
And these undersea cables are massive, consisting of hundreds of fiber optic fibers, each of them 60
using lasers to transmit up to 400 gigabytes of data per second. 61
This is a cross-section of one of the cables that runs to New Zealand. 62
It's an absolute marvel of modern technology, and it looks really beautiful, don't you think? 63
And to think that every single time we load up a web page or click on a button on a website, behind 64
the scenes was sending signals that navigates all of this crazy underwater and above water wires 65
and all I need is just an IP address. 66
And through tiny electric signals, traveling at the speed of light through the oceans and halfway around 67
the world, 68
in a matter of milliseconds, I get to view my favorite websites, and that is how awesome the Internet 69
is. 70
And we're going to be taking it to build our own websites and web apps. 71
And to be able to do that, we first have to understand how exactly do websites work. 72
So for all of that and more, I'll see you on the next lesson.