The Internet Runs on Magic

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] what you've just witnessed was the front end of a process spinning thousands of miles dozens of organizations and about 10 seconds in other words i loaded a web page on the internet and you know the internet is a pretty fascinating place isn't it you've got massive collaborative encyclopedias social media and a consistent stream of video entertainment except for one little thing i hate to be the well actually guy but um actually all of those technologies are on the web and the internet and the web aren't quite the same thing the web is part of the internet for sure but not everything on the internet is part of the web the difference really lies in that the web is a medium you can put pages on it files even interactive content the internet is just all the equipment that connects everything in the web together you can even browse web pages without the internet here i've physically disconnected my mac from the internet but i can still open up web pages stored on the hard drive conversely there's a lot of stuff on the internet that isn't necessarily on the web think of basically any app on your phone unless you're using a browser like chrome or firefox chances are any online content you see in the app isn't part of the web but it definitely came to you over the internet but in that case what is the internet anyways really the internet is just an information delivery service and nothing more you give it to computers and some chunk of digital information and the internet will attempt to transfer it from point a to point b that's all it is an idea so simple and so general that decades of technology and massive industries can be built upon but that kind of popularity makes things a little more difficult to implement connecting two machines to share information is pretty easy all you need is a wire three computers need three wires four computers need six wires by the time we've hit a billion computers though we're gonna have a problem not only would it require an unimaginable amount of wire to connect every pair of computers but each computer would have a billion wires coming out of it and most of which would probably go unused one solution to this is to put some sort of routing center in between all the computers a message comes in then gets sent back out through the right line in that case though the center has to be ready to handle a lot of traffic and in the event that it fails for one reason or another everyone gets kicked offline the internet gets around this issue by creating a decentralized network every computer is connected to a few others and by passing messages along from node to node we can give the illusion of a direct connection between any pair of nodes alright so we have our network we can pass messages around at least on paper things look like they might work so here's another curveball the internet should work across a bunch of different connection types and it should work for pretty much any communications application you throw at it except different applications like messaging and live streaming care about different qualities in our connection sometimes we need a message to be sent correctly sometimes it just needs to be sent quickly in the real world where lines can be noisy and servers can get congested these two are generally mutually exclusive that's why in 1982 the internet protocol suite a document laying the groundwork for much of the modern internet presented a layered communication model the idea to solve a lot of these issues is to break up a connection between two computers into four layers the link layer the internet layer the transport layer and the application layer each layer makes certain assumptions on what the layers below it will do and likewise makes guarantees to the next layer up and when all four layers come together we can send data across the internet but watch this is where the magic happens all we ever specified is what each layer has to do nowhere do we say how it had to be done and in fact as long as the technologies we choose i'll carry out their responsibilities we can mix and match our connection however we want so what do all these layers do the whole stack is built upon the link layer its job is to exchange data between any two directly connected machines another way to think of this is if the internet were the postal service and data were packages being shipped around the link layer would be the roads between every post office home and sorting facility it's just one hop from some place to another for some packages where they're going they don't even need roads instead they travel by air or sea and in a computer network it works the same way some machines are directly wired some communicate over wi-fi and some use cellular data it wouldn't be practical at all but even flag semaphore could be your link layer once we have communication between hosts we can pass messages around along the network but in order to know where everything goes we call on the internet layer and the internet layer handles a lot of things it gives each computer on the network its own identifier it tells each node how to forward traffic and it sets a few rules about how data is to be passed around while the internet layer can be any implementation almost all traffic on the internet is using some version of the internet protocol ipv4 or ipv6 the internet protocol is where we get ip addresses a number used to uniquely identify any computer in the world just like a real address when shipping a package the internet layer is also responsible for routing each bit of data in the right direction toward the target either sending it directly there or to the next closest node on the network one other thing the internet protocol introduces is the concept of packet switching data isn't just sent around the internet in one big piece instead it gets broken into really small packets of data before being sent and as the packets are received the message gets reconstructed it's kind of like a weight limit for a given package and for good reason in practice the internet is not perfect suppose you wanted to move across the country but you really liked your house and so you decide to ship it in the mail obviously this is a pretty big task for the postal service and it's quite possible that the trucks and sorting facilities aren't even equipped to handle a shipment of that size it's very likely no other mail is going to go through until this house is dealt with and even worse the internet and the postal system are not perfect just like signals can be interfered with we need to account for packages going missing every once in a while if you get unlucky you may be out of a house but what if you took apart the house before you sent it and we individually package each brick then when everything arrives a construction crew rebuilds the house not only does this make things easier on the postal service since a couple bricks can fit in a mail truck but it also has a few additional perks for one losing a package isn't that big of a deal if something goes missing we've just lost one brick not the whole house because the house has been divided into several shipments we can send it across several trucks and post offices at the same time so no one point of the shipping network gets backed up with mail thanks to packet switching we can send a house through the mail the internet layer sends big chunks of data to any other computer of the network and makes packets for us but one thing it doesn't guarantee is that all the packets will make the journey safely according to the internet protocol suite it is perfectly legal for the internet layer to send packets out of order screw up the data inside them even just flat out lose them that's where the next level of the stack the transport layer comes into play if the link layer and the internet layer are there to pass packets around the internet then the transport layer is there to deal with all the messy pins and make sure everything goes smoothly for example tcp the transmission control protocol takes care of things like packets that are dropped packets that are wrong and packets that are received in the wrong order short of cutting off the connections somewhere tcp essentially ensures that what you send on one end is what you get on the other end of course the transport layer adds more than just reliability to a network it can also iron out some of the less friendly aspects of communication like packet switching in most cases sending around packets that hop across several nodes on the network adds an unnecessary level of detail tcp folds all of this complexity away to give the illusion of a direct connection that acts like a pipe you stream data in one end and a stream of data comes out the other plus tcp allows for multiple different streams of data through ports just like how each computer on the internet has its own ip address each connection within a computer has its own port number each application has its own specific number like 80 for web content 20 for file transfers and 25 565 for minecraft servers the transport layer is really the place where simple packet switching network gets smart but all these features do come with a cost tcp is slow say for instance you're streaming live video online packets come in they get displayed everything is good but if something goes wrong with just one of the packets everything else that's coming in will have to wait until that packet gets sent again this can take a while since it requires a message to go all the way from the client to the server and then back again even though we have more up-to-date data tcp will make us wait until the transmission is perfect before we can continue thanks to our separate layers of communication though we can swap out tcp for something better suited for streaming like udp the user datagram protocol udp cuts out a lot of the fat of tcp no more pipes no guarantee that every bit of data will go through all it has is a way to verify that a packet has been received correctly in the ability to have multiple ports what we lose in reliability though we make up for an efficiency udp datagrams can be sent around quickly and if one fails we just ignore it and wait for the next one and there we have it a way to reliably connect any two computers on a network so the data can be streamed from one to the other whatever technologies end up being used the first three layers of the internet protocol lay the perfect foundation for the fourth and final layer the application layer there are a lot of different ways you can use a connection between two computers and the application layer is where all of these different use cases are on show if everything we've talked about up until now is like the postal service then the application layer is like the language you use to write your letters it's what makes the world wide web email and messaging all unique each one has different context specific information like web addresses and file paths versus email addresses and message contents protocols in the application layer describe what type of information will be sent and how the recipient should expect to receive it probably the simplest application is telnet a way to remotely access another computer rather than typing into a terminal at the target computer telnet puts the terminal on the other side of the tcp pipe anything that gets typed in gets sent down the pipe and everything that gets printed out comes back through the pipe we don't just access the internet through telnet though most applications add a bit more wrapping between the user in the transport layer like when browsing the web to access a web page messages are sent using the hypertext transfer protocol which says what web page to send and usually some details about the computer making the request then the web server responds with information about the web page and its contents what's cool is at the application layer a lot more of the communications begin to look like english rather than bit patterns for example this is what an http header looks like it's pretty human readable this is what your web browser sends whenever you go on google or youtube or any other website a request in http which gets sent using tcp which routes packets with ipv4 or ipv6 across a variety of connections like wi-fi ethernet fiber optic cables and who knows what else every layer of the stack is interchangeable so it doesn't matter if you're sending email from your computer surfing the world wide web from your pocket pc or even just watching a live stream on your smart refrigerator everything should just work and this was the design philosophy of the internet from day one it's right there in the name internet the network to connect all other networks of course the design would need to be flexible choice is the magic that runs the internet and this isn't just a perk from the days before almost everything online used the tcp stack this networking model is still useful today take for instance the two internet layer technologies ipv4 and ipv6 to massively oversimplify ipv4 can only handle around 4 billion unique ip addresses and as the internet continues to grow we've basically run out of ip addresses to give out ipv6 resolves this issue for the foreseeable future by extending the number of addresses to be given out in any other kind of network design this switch might raise an issue but thanks to the internet protocol suite's layered design we don't need to completely rebuild the internet just to fix one component of it the internet is a technological marvel in no small part because of this modularity it's the reason everyone and everything can use this one universal network for essentially any purpose at the end of the day the internet is just an information delivery service but because of the good organizational ideas early on in its development it remains the primary method by which data gets passed around today and probably well into the future the internet a general purpose information super highway a digital ocean and with that all i can say is surfs up see you on the net [Music]
Info
Channel: The Science Elf
Views: 90,403
Rating: undefined out of 5
Keywords:
Id: _3Q7DPVpagM
Channel Id: undefined
Length: 13min 32sec (812 seconds)
Published: Sun Jul 19 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.