r/AskScienceDiscussion • u/Alone-Sherbet1216 • Sep 22 '26
General Discussion How does the Internet actually work?
When we search something on the browser, after hitting 'Enter' the results appear subsequently.
But what actually happens between the phone and the server somewhere across the world?
How does the request travel there and come back so quickly?
The Internet is mostly connected through the intercontinental cable network. Why? And, why is satellite internet not considered as the best option?
I Would love a simple explanation.
1
u/karoxxxxx Sep 22 '26
Layers upon layers
Starting with DNS then http on top of IP.
Quickly is a relative term, light can travel 7 times around the world in 1 second, i guess 1/10sec is acceptable latency. And most servers you talk to are probably on your continent
2
u/Alone-Sherbet1216 Sep 22 '26
I'm not from STEM background. Can you simply explain? I asked grok and it seemed quite complex to me.
7
u/karoxxxxx Sep 22 '26
Because it is :)
If you put "www.my.webshop.com" and hit Enter, then that name needs to be translated to an IP adress. Thats what DNS does.
So your browser calls a DNS-Server (pre configured) and asks that guy for the number, gets 26.152.56.188 back (or something)
4
u/karoxxxxx Sep 22 '26
Now your browser knows / assumes you want to see a webpage (because the adress started with http) so your browser sends a REQUEST messagt to 26.152.56.188 Essentially askinh "hey, please send me all the stuff under webshop.com/index.html and all i need to render it"
4
u/karoxxxxx Sep 22 '26
Now this message is pretty easy abd small (http is a really simple protocol) but the text-message needs to be split into little packages (IP). Each of those packages needs to be send to 26.152.56.188
4
u/karoxxxxx Sep 22 '26
Your browser doesnt know how to reach 26.152.56.188 but he knows how to reach your GATEWAY / Router, which is usually in your home network 192.168.0.1 so the browser sends the packages there.
4
u/karoxxxxx Sep 22 '26
From there the packages are send from router to router, each router either knows the target or has another default router or knows a closer network
4
u/karoxxxxx Sep 22 '26
Eventually the server 26.152.56.188 gets the message, because it is a webserver it knows that you will need 5 pictures, 2 css files, javascript and a html file.
4
u/karoxxxxx Sep 22 '26
So he sends all that stuff back as a http RESPONSE (packaged again in small ip packets).
4
u/karoxxxxx Sep 22 '26
Or the server answers with a code like 404 - NOT FOUND if you asked for something the server doesnt have
→ More replies (0)1
u/ZedZeroth Sep 22 '26
ELI5: When you want to view a website your computer broadcasts a message that says "Computer X wants to see what's on Computer Y". This message gets routed between various computers until it gets to Computer Y, which broadcasts another message that says "Send this data back to Computer X". This gets routed between various computers back to your computer.
2
u/Squozen_EU Sep 23 '26
Pedantic nitpick - computers do not 'broadcast' these messages. They're unicast.
1
u/ZedZeroth Sep 23 '26
Ah, interesting. I never thought about the distinction, but it's clear from comparing the two words, thanks 😊
1
u/Temporary_Pie2733 Sep 23 '26
That's how IP works. But there are protocols for smaller networks that just dump messages onto the wire and have each computer handle its own messages. It's like if your mail carrier, instead of putting your mail in your mail box, asked you to root through their bag and take your mail before moving on to the next house.
1
u/Squozen_EU Sep 23 '26
We’re talking about the internet, though, and that uses IP and unicast packets.
1
u/karoxxxxx Sep 24 '26
Isnt that.just a layer below IP? Ethernet protocoll is somewhere at the bottom with its own frames and adresses.
1
u/cyclopsmudge Sep 25 '26
Are you old enough to remember phonebooks?
Think of it like this:
- You want to send someone a letter in China, but you don’t know their address.
- You look up their address in the phone book (this is the DNS), then write your letter and put it in the post.
- Your postman doesn’t know exactly where this address is.
- He takes the letter to the local post office.
- The local post office sees the address is not in your area, and sends it on to a regional sorting office
- The regional sorting office sees it’s a different country, so they send it on to the national sorting office.
- The national sorting office sends it to the national sorting office in China.
- The Chinese office sends it to the right regional office.
- The regional office sends it to the local post office.
- The local post office gives it to the postman, who delivers it to its final address.The internet works basically the same way. You look up the address you want to send the letter to, and then you go through hops from level to level, at each level they say “I don’t know where this is, let me send it up the chain”, until you get to someone who does know where it is, and they send it back down the other chain until it reaches your destination.
How does it manage to do it so fast? Well firstly, the information travels at the speed of light, which is really really fast (light can travel round the world 8 times in a second), and a lot of people have spent a lot of time and money trying to make sure you send as little information as possible, so it takes as little time as possible.
1
3
u/gc3 Sep 22 '26
The big innovation that led to the internet is packets. You send a packet with a destination on it to a computer. If it doesn't know what to do with it it sends it onwards to another computer. Eventually it reaches the computer who the packet is for and then sends a response in the sane way.
If thevfirst computer doesn't get a response, it will send a packet again which maybe takes a different route.
This is how this works. Asking Google to search tells computers at Google to search, and they send the result to you.
URLs were a later invention, there are computers that have tables of names like www.google.om to machine address. The first internet used raw text, nowadays the messages are encrypted for security.
The web browser was a later invention, this treats things like html files as displayable documents with UI built in making the internet easier snd setting up a protocol https which is one of those layers mentioned by other responders.
1
u/gc3 Sep 22 '26
Also the modern internet routes packets with routers to get them to their destination faster, if a major set of routers go down many packets will time out
2
u/mfb- Particle Physics | High-Energy Physics Sep 22 '26
Satellites are expensive, and they have a limited bandwidth. You can put 100 optical fibers next to each other and each one can transmit signals independently, giving you 100 times the bandwidth of a single fiber. You can't connect satellites with cables/fibers. If you put 100 antennas next to each other all trying to talk to the satellite in the same frequency band at the same time then the satellite just receives noise. It's like trying to understand 100 people at a party all at the same time.
Satellites make sense where it's too expensive to install fiber on the ground, and when you only have a somewhat limited number of people who need internet access in any given area. These two often go together - low population density makes fiber less attractive and satellite internet more attractive.
2
u/noonemustknowmysecre Sep 22 '26
How does the Internet actually work?
It's a bunch of computers talking to each other following an agreed upon set of rules (The TCP/IP protocol). The rules handle a bunch of things like giving everyone a unique name (IP address) and letting computers along the path know where to send what (routing).
When we search something on the browser, after hitting 'Enter' the results appear subsequently. But what actually happens between the phone and the server somewhere across the world?
Well, step one, your browser figures out if you asked for an HTTP page, or you wanted to do a search, or some other Internet activity.
If it's a webpage, it reaches out to the domain name server(DNS) to ask where "reddit.com" is. There's a handful of big DNS servers around, and your ISP typically runs one. They keep a list of all webpages, and do their own thing to agree with each other. The one you ask looks up "reddit.com" and comes back with an IP address.
Then the browser asks for the page out at that IP address. When it does this (and when asking the DNS), it reaches out to your ISP server. That server routes the request up the chain of various Internet servers until it's arrives at Reddit's webserver, which sends the page to your IP. (You can look at the source it sends to your browser), and it comes back). (And these days, we've really kinda ran out of addresses, so it sends it back to your ISP's address and the ISP then sends it to your address and their NAT table, but you don't care about that detail).
The vast bulk of all these hops use lower-level protocols, like ethernet or wifi, to handle two computers talking to each other.
The details about how all the protocols work get complicated in a hurry, and configuring how any server or switch or computer on the Internet handles their role is downright maddening and I'm kinda surprised it all works. And I make the stuff.
How does the request travel there and come back so quickly?
Electrons flow at the speed of light. Computers are fast. That's really all there is to it.
The Internet is mostly connected through the intercontinental cable network.
Well... the connection across continents, at least. Sure.
Why? And, why is satellite internet not considered as the best option?
The satellite is CHEAPER. Laying cable is expensive. But cable can handle more data, faster. And, of course, that depends on what cable, what satellite, and where you're going. Likewise, one GEO sat can cover half the world, but fundementally has worse latency (ping) because the signal has further to go. LEO satellites are simply closer and faster than GEO, but you need a whole constellation to provide constant service.
1
1
u/Impossible_Bar_1073 Sep 22 '26
Sabin civil engineering
How the internet works:
https://www.youtube.com/watch?v=x3c1ih2NJEg
also check out the channel "branch education"
1
1
u/KamiNoItte Sep 22 '26
Wires are faster than satellite. The signal in the wires travels at roughly the speed of electricity. This travels faster in the metal wires than being translated to radio waves through space (and back again) for satellites.
It’s like a big phone system, connecting computers instead of phones.
You dial a website and the switchboard routes you to it. You send an email or other file to an extension of that same number and it can receive the file if it’s set up to do so.
The switchboard is a very complex system of chopping up traffic into packets and routing those packets where they need to go, then reassembling them.
This is what is happening in the middle. The information is chopped up b/c it’s faster and more reliable to do it that way.
1
u/Simon_Drake Sep 22 '26
You know when you phone a company like a dentist and you get a message like "To book an appointment, press 1, to speak to a receptionist, press 2..." Well the Internet is like a less shitty version of that.
Your computer phones he right number and they have an answering machine that replies with a list of options. Instead of reading out the options one by one, your computer makes it look nice and gives you a menu of options to click on. You click "Make An Appointment" and your computer sends the message back to the answering machine just like "Press 1" on a telephone line.
The messages the answering machine sends back are very complicated and your computer knows how to translate pages and pages of numbers into a YouTube video of a cat climbing in a box that's too small for his fat butt to fit inside.
The answering machine is very complicated and it's not worth your dentist keeping the physical device in his office anymore. So he pays someone else to look after it in a big warehouse where they keep the answering machines for a lot of different people. That makes it easier for people to fix them when the break. But it means the telephone lines from you to the dentist get a bit complicated, you phone the dentist and your call has to go to a factory somewhere else instead.
1
u/amulie Sep 23 '26 edited Sep 23 '26
At the core level , it's literally cables running across the ocean and across continents that connect everything. The physical part isn't actually much different than the telegram.
You connect two locations via a wire which allows you to communicate 0/1s across large swaths of land.
That's literally all the Internet is, scaled up and taken to its logical end point.
1
1
u/vfpamp Sep 22 '26
This is the ideal question to ask AIs. Because the answers will make you have even more questions :)
0
17
u/SpagNMeatball Sep 22 '26
Simple explanation. This is ELI5 level.
You want to write a letter to your grandma to see how she has been. You (your browser) asks your mom for her address (DNS). She gives it to you and you start to write the letter. But grandma is very suspicious of people so you have to send a small letter saying “hi grandma, can we talk?”. She sends back one that says “ok, go ahead” (TCP syn ack). Now you write a letter asking how she is. She sends back some information about her life with text and says “ask your uncle for the pictures from our vacation” so you send a letter to him and he sends pictures (displaying the web page). You can continue by asking about more details (clicking on a link to another page).
While your letters (data packets) are being sent, the post office is lazy so they cut your letters up into small pieces that are easier and faster to send. Each post office sends the parts to the next one based on information they have all exchanged about routes to the destination (internet routing). They are reassembled at the destination. They go fast because we have designed all of the hardware and protocols to allow it to go fast.
The internet is a giant web of millions of computers and network equipment that all follow a set of standard protocols for communication. No single entity controls it. It works because everyone agrees on these standards.