We're a business powered by the cloud, so we thought we'd answer that timeless question: how does the Internet work, anyway?Not all that long ago, human communications systems were powered by hay. The Pony Express was once the pinnacle of ‘instant messaging’. We’d never had a means to liaise over long distances more advanced than shouting until then, and boy were we proud.Thankfully, by now we’ve progressed a little further. We can fire off emails, Skype one another and send pictures to the other side of the world in fractions of a second with a simple tap on the small electronic rectangle in our pocket.Ahh, the Internet. The amazing, unseen force powering basically everything we do. Every Facebook message, every listing on realestate.com, every movie on Netflix – all thanks to this mystical, unseen network of… what?The Internet has fallen into the same category as magnets. A ubiquitous something that everyone knows about, but very few actually understand - including your humble author before the eons of research that went into this post. Well, we thought we’d take a look at this Gordian knot, and figure out what’s actually going on behind the scenes every time you log into Rex or Google something.
The language of computers
The first thing you need to understand before you try wrapping your head around this vast, complicated system: what all the information being flung across the globe actually looks like.You’re probably already well aware computers think and communicate in ones and zeros. (These are called ‘bits’).‘Ones and zeros’, are actually a representation of an ‘on’ or ‘off’ respectively. Because each bit has only two possible states, we call this ‘binary’ code.
Computers operate like this because their processors aren’t actually that clever at all. In essence, it all comes down to thousands of tiny transistors doing step-by-step, kindergarten-grade mathematics. They just do it at warp-speed.A transistor? A tiny electronic switch that can be turned ‘on’ or ‘off’ – hence all the information we give to a computer is, at its most basic level, these ‘one or zero’ instructions. Send a bit of binary down an enormous labyrinth of switches and something the computer can work with will pop out at the other end. Put enough of them in a row and you can light up the right combination of pixels on a screen to watch a movie. Every video game you’ve ever played, every Facebook status you’ve ever written - it’s all binary.At the end of the day, computers all work the same - they’re an interface or translation service for trillions upon trillions of ones and zeros.It should come as no surprise then, that since these instructions are so incredibly basic, yet the results are so incredible, you’re going to need a LOT of ones and zeros.
How many bits?
When I say a lot of bits - I mean a lot. More than we can really comprehend.Eight bits strung together equals one byte. One thousand bytes strung together is a kilobyte. One thousand kilobytes strung together is a megabyte. And so on and so forth.The word “it” - two insignificant characters taking up a grand total of two bytes – looks like this in binary: “01101001 01110100”. The complete works of William Shakespeare, on the other hand, (which total 3,695,990 characters) and take up around 5 megabytes.And that’s just text. A single high-resolution photo usually equates to around 2 megabytes.That means that in order for your computer to show you this obscenely click-worthy kitten, your computer just downloaded and processed 160 million ones and zeros. (Well, actually, this particular kitten isn't quite 2MB - but you get the idea). Ada Lovelace would be so proud to see her ground-breaking achievements put to such profound use. Or possibly rolling over in her grave.
160 million flicks of a switch. And that’s just a picture. Imagine what goes into a BluRay Lord of the Rings box set.So where did those 160 million ones and zeros come from and how did they get onto your computer?Imagine it like a slightly more complex Morse Code. A series of blips travelling across a wire. Short beep. Two long beeps. Four short beeps. Long beep. Congratulations. That’s the letter’ A’. Rather than beeps, however, we use signals and silence. If a signal is sent, it’s an ‘on’ or a ‘one’. No signal means an ‘off’ or a ‘zero’.When communicating, computers start timers and start firing off binary at a ridiculous tempo - measured in BPS or ‘Bits Per Second’. Computers agree on the pace depending on network speeds, and away they go.TL;DR: Computers work and communicate with ‘on’ and ‘off’ signals – gazillions of them.
How do we share information?
Here’s where things start to get really cool. How exactly do these ones and zeros get from my computer to yours?Even though you think you can’t see the Internet – in fact, you can. You might have to do some deep sea diving and a whole lot of digging, but it’s possible.The Internet isn’t some invisible force - it’s a physical, tangible network of fibre optics, radio transmitters and cabling. And it’s massive. It crawls across the face of the planet like some horrific neural network, connecting just about every computer to one another.Think of this network like a road map. If I was to try and deliver a message to my friend via car instead of email, there’d need to be a continuous stream of bitumen all the way from my driveway to theirs. Same goes for all those ones and zeros – they need a route to travel on.And just like a road map - the internet has rules. In fact, Vint Cerf, one of the creators of the modern ‘net had this to say:”One thing that people do not appreciate is that the internet is really a design philosophy and an architecture expressed in a set of protocols”.Gibberish, yes. But clever gibberish nonetheless.Basically, computer protocols are just a set of rules and regulations - if everyone follows them, data can be shared, and we can communicate without too many hiccups. They’re the standard we follow that ensures I can communicate with any other Internet-connected computer on the planet. They’re the laws of the internet road.We’ll go into more detail on a few of these protocols later on. The physical system is much more interesting. There are three main ways ones and zeros travel:
We can send them via copper wire as electrical signals. Copper is (was) cheap and easy to work with – but because it’s reasonably resistant, it doesn’t work well over really large distances. You know, things like oceans or great distances between cities. Data can be lost, and it’s not very fast.
Thankfully, light is very fast. As a matter of fact, it’s the fastest thing in the universe. And we clever humans have figured out how to use it to send data. (Bit of an upgrade from the Pony Express, no?). Because electrical signals travel down a wire at around 1% the speed of light, fibre optic cable have a far higher bandwidth - meaning we can send a hell of a lot more data over the same time period. There are hundreds of thousands of kilometres of underwater fibre optic cables joining the continents together.
These are, of course, susceptible to sharks.But how about wireless Internet? What about our phones and tablets and laptops that work without any cables at all?
Radio frequencies and modems
Like mobile phones, WiFi uses radio waves to send information. Adapters in your computer translate the ones and zeros into a radio signal, which is broadcasted across thin air and subsequently picked up and translated back into electrical signals by your WiFi router/smartphone/laptop/etc.These three means of transporting ones and zeros are the driving force of the Internet. They act like the highways, streets and driveways that we would use to transport physical goods.
Awesome. Now we have an idea of what the infrastructure that carries our data around looks like. But considering that one image alone was made up of 160,000,000 individual signals (bits) – how does that volume of data travel? Certainly not in one enormous chunk. That would be like trying to force a basketball down a garden hose.To get to your computer, that image has been broken down and reassembled on location. In a way, it’s a bit like a jigsaw puzzle. Rather than trying to send one massive file, computers break down the information into ‘packets’ - a package of about 1,500 bytes – and send each one individually.
IP addresses and the Domain Name System
Each of these packets is wrapped in some key information. Most prominently, the addresses of the sender and receiver's computers. That’s right, just like your letterbox, computers have their own unique address. These are called IP (Internet Protocol) addresses. They make sure the data you request is delivered to the right place and poor Mrs Winthrop doesn’t accidently receive all the unspeakable horrors the kid next door is probably Googling when she’s looking up cross-stitch patterns.IP addresses, like street addresses, contain the location of the computer. They’re made up of four numbers: W.X.Y.Z. Three of these numbers (W.X.Y), show which network your computer belongs to. The last number (Z) shows your ‘host address’, which identifies which computer on the network we’re looking for.Think of it like a phone number. The first few digits show your area code, and the remaining numbers personalise it to you.
For example, one of Google’s main servers is at 220.127.116.11. When you go to www.google.com, your browser takes you there.Computers love numbers. Humans tend to hate them. Try memorising the IP address of every website you go to on a regular basis. So to make the web easier to navigate, we employ the services of things called Domain Name System servers (or DNS Servers). These act like enormous, digital phone directories – cataloguing URLs and the respective IP address they can be reached on so we don’t have to memorise enormous strings of numbers. I can type ‘www.google.com’ and be safe in the knowledge that the DNS server will take care of the rest.For more information on how DNS servers work, we strongly recommend this. It’s bright, it’s illustrated - it’s wholesome fun for the whole family.
How your data goes from A to B via X, Y and Z
So now we’ve broken down what data is, what ‘packets’ are, how computers are indexed with IP addresses and what types of lines all these ones and zeros travel on.But as if that all wasn’t complicated enough, the Internet has one last surprise up its sleeve: ‘packet-switching’. The genius way your data travels from A to B via X, Y and Z.Let’s say I call you on Skype. I could be anywhere on the planet, and we could still be having a (usually) seamless, face-to-face conversation. So seamless in fact, that it’d feel as though, like a phone call, there’s a direct connection between your computer and mine. The reality is very different.When we’re in a Skype call with one another, in between our two computers is a vast web of other computers. This is what we know as ‘The Internet’; a world-wide infrastructure of connected devices.On a system like this, data can travel in a much less direct way. It need not follow a fixed path. As a matter of fact, each of the thousands and thousands of packets that were required to send that kitten picture might have even taken a completely separate route from our server to your computer.Packets are able to travel from one computer to another like you might drive across the city in a car. How you get from A to B is dependent on a myriad of variables. Depending on traffic, road conditions, ticker-tape parades, speed restrictions – whatever - you might be forced to take a different route than normal.Routers take the role of drivers where the internet is concerned. They use a protocol called ‘unicasting’ to decide which route is best to send the packets down at any given time. You can learn more about how unicasting works here.Here’s an example. In the best case scenario, your data travels in a pretty straightforward fashion from your computer to the server.
But what happens when something goes wrong? What if a computer is destroyed, or a line is cut?
In situations like the one above (where a massive pair of scissors have done a Godzilla and made a mockery of our pleasant computer cadre) the router will do a bit of computer magic and find a different route.
There we are - much better. Your packets might take a little longer to reach their destination (we’re talking fractions of a second) but slow and steady win the race, you know?It might sound overly complicated for seemingly no reason, but thanks to this ‘packet switching’ (as it’s known) the Internet is incredibly reliable. If a route is congested, a computer stops working, an A-Bomb is dropped on an unlucky router or a line is cut somewhere – it doesn’t matter. There are so many interconnected computers, and thus so many alternate routes, that packets can pretty much always find their way to the finish line.Interestingly enough, the Internet was designed this way in part to stop enemy forces from taking it down in WWII. The A-Bomb example isn’t so silly afterall. Engineers designed the system so that couldn’t be taken out by a single attack on any portion of the network.
Transmission Control Protocol
Considering packets often take different routes to get to their destination, it stands to reason that sometimes they might not all make it. What’s more, they might arrive completely out of sequence. This isn’t very convenient when, say, I’m trying to stream a song on Spotify. I want Stairway to Heaven to start at the beginning, finish at the end, and have all the bits in the middle in the right order.Thanks to the ‘Transmission Control Protocol’, we can rest safe in the knowledge the internet has us covered.TCP stands at the door with a clipboard and collects your delivery - ticking off each packet as it comes in. If it finds that Spotify has forgotten Jimmy Page’s ripper guitar solo when delivering Stairway to Heaven to me, it’s not going to be impressed. In fact, it’ll kick up a stink and demand that they send it again. TCP is firm but fair - it won’t sign off on the delivery until all the pieces have arrived. Once you have everything, it puts all the pieces of the puzzle together in the right order and hands it over to your computer.If only we had a similar system for all those DIY Ikea kitchen sets.
The whole process - how the Internet works
I’m going to hazard a guess that if you’ve gotten this far, your brain is pretty full by now. So let’s conclude with a run-down of everything that happens when, for instance, you head to Google.Let’s set the scene. You’re at home, and you need to look up cinema showing times or the price of yogurt or something. You grab your laptop, and punch in ‘www.google.com’.Your computer sends the URL to the closest DNS server. Luckily, it already knows the IP, and doesn’t need to ask a second, third or fourth DNS server for the right address like it might for a less common website.Boom, you’re away. Your request (probably) travels to Sydney along a whole lot of copper and fibre lines, before being zipped across the Pacific Ocean on the Southern Cross cable. It’ll bounce from either Fiji or New Zealand, before jumping Hawaii and arriving in California.From the coasts of California it travels to Google’s servers – arriving as just one of the 54,952 requests they receive on average per second. Your request asks a common question; “Please send the code for your website back to the sender”. Google oblige.The website code is broken down into ‘packets’ - each of which is individually sent down the best possible route back to you. They race back across the Pacific to Sydney as light beams, before being turned back into electrical signals that find their way back to your computer via copper.Now they’ve arrived, TCP checks to ensure it has every single packet before reassembling the puzzle. If it doesn’t, it’ll resend the request. As per usual, they all arrived on time, so your browser loads the code and turns it into something you can use. Google’s homepage appears on your screen – ready for you to send another, far more complicated request.This has all taken roughly two seconds.The Internet truly is one of humanity’s greatest creations.
The future of the Internet
The Internet is huge. And it’s only getting bigger. In fact, it’s even thought it might follow Moore’s Law and double in size every 5.32 years.If you ask me, that’s believable. Both data and infrastructure are growing at an incredible rate.Already, we have an estimated 4.9 billion Internet connected devices – laptops, cars, phones, home appliances, industrial equipment, smartwatches, fitness trackers – the list goes on. As the ‘Internet of Things’ booms, this number is set to explode to an expected 25 billion devices by 2020.The internet is growing so quickly that we’ve already had to start moving to a new IP Address system to accommodate for the its unexpected popularity. The old system (IPv4) provides more than 4 billion unique addresses – but we’ve already well passed that number. We’re in the process of a multi-year transition to IPv6 – which provides 340 undecillion new addresses (a slight improvement). That should keep us going for while.But as amazing as the infrastructure growth is, the volume of data stored across all of these computers is growing even faster.We’ve grown humanity’s collective databank by 90% in the last two years alone. All those Facebook statuses, pictures and high-scores on Candy CrushSaga add up, you know.As cognitive psychologist and neuroscientist Dr. Daniel Levitin told in a talk for Google:“Americans take in five times as much information today as [they] did in 1986. That’s the equivalent of 174 newspapers worth of information. During our leisure time alone we process 34 gigabytes of information. We‘ve created a world that has 300 Exabytes of information. If just one person’s data was written on 3x5 index cards and laid out end to end and side by side, it would cover all of the square miles of Massachusetts and Connecticut combined.”Just to clarify, an ‘Exabyte’ is one quintillion bytes. That means 300 Exabytes is equal to 2.4 sextillion bits. We rarely ever deal with numbers this large, so to paint the picture for you, that’s 2,400,000,000,000,000,000,000 ones and zeros. If we printed that out in one continuous line (12pt sized text) it would go on for 5.08000699×1015 kilometres - roughly 1.2 million times the distance from the sun to Pluto.With more and more devices, more Internet users, and more applications for software, this incredible rate of data-production doesn’t look to be slowing down in a hurry. It’s been estimated that we’ll have 50 times our current amount of saved ones and zeros by 2020.Good god.In the next four years, we’ll have five times the number of Internet connected devices, and fifty times the data. What will this mean for the Internet?To be frank – we don’t know. No-one does.Some hypothesize that the Internet is going to become so vast and complicated, it might develop its own consciousness. Our progress with Artificial Intelligence actually makes this theory somewhat believable. Take the sheer number of computers, times that by the sheer number of transistors in each one, and you’ve got a way bigger number than the total amount of synapses in even our big, clever brains.Some hypothesize we’ll have Internet access on Mars and virtual classrooms for students world-wide by 2030. Our devices will send devices back and forth to one another without us even prompting – data will act like society’s nervous system, and machine learning will enable conveniences we’ve never known before. Whether this will widen or close the gap between the rich and the poor is unknown.There’s really no knowing what the Internet will bring in years to come. All we know is that the next time you post something on Facebook, you should take a moment to consider how incredibly complicated the whole damn process really is and give your thanks to the amazing people who created it.