Have you ever wondered what happens in the background when you send a WhatsApp message to your friend? π€π±
How does it happen so easily that we donβt even notice the number of things happening in milliseconds during the transfer of data? πβ‘ If youβre thinking about all this, youβre absolutely in the right place! π€οΈβ¨
Letβs explore this in this article. ππ‘
This guide is for absolute beginners, so donβt worry if you donβt have any prior knowledgeβweβve got you covered. ππ
What is Internet? π
Before we jump into the internet, letβs first understand what a network is and how itβs related to the internet. π€
A network is basically a collection of devices (like computers, routers, etc.) connected to each other to share information or resources. π₯οΈπ‘ You can think of a computer network like your cohort group in Discord π§βπ€βπ§π¬, where everyone shares and accesses each other's blogs.
The internet, on the other hand, is a vast collection of networks connected to each other. πβ¨ In fact, the word "internet" comes from the concept of interconnected networks. π
Working of Internet
Now that we understand the basic concept of the internet, letβs dive deeper into how these connections actually work. ππ
When I mentioned the connection of devices, you might wonder what happens under the hood of this connection.π» Letβs break it down step by step: π οΈπ
Physical Connections
Computer connect with each other via :
Wires and Cables:
Ethernet cables are used for smaller nearby distances that connects devices directly to network for fast and stable connection.
Fiber-optic cables are used for longer distances that transmits data as light signals, enabling high-speed data transfer.
Radio Waves:
Wi-Fi: A wireless technology that allows devices to connect to the internet within a certain range using radio waves.
Cellular Networks: Mobile data connects devices through 4G/5G networks, using radio waves to communicate with cell towers.
These connections form the foundation of how devices communicate with each other.π€
Now we will understand the flow of how the internet works. πβ‘οΈπΆ
Internet Protocols π§
Every device on the internet communicates using a set of rules called protocols:
TCP/IP (Transmission Control Protocol/Internet Protocol):
Ensures reliability during the transfer of data packets. β
Splits data into small packets for transmission. π¦
HTTP/HTTPS (HyperText Transfer Protocol):
Used for browsing websites. π
HTTPS adds encryption for secure communication. π
π Learn more about protocols here: GeeksforGeeks - Types of Internet Protocols
Addresses and Domain Names π·οΈ
Each device is assigned a unique identifier known as an IP address (like 192.168.0.1
). To make it easier for humans to access resources:
Domain Names (e.g.,
www.google.com
) act as the contact list app in your phone. πDNS (Domain Name System) converts these names into IP addresses so devices know where to send requests. π
Routing Data π
Once the connection is established:
The browser knows the address to send the data. It prepares the data along with metadata (extra information) and divides it into packets. βοΈπ¦
Packets are routed via multiple devices like:
Routers: Direct packets between networks, ensuring they follow the optimal path. π£οΈ
Switches: Manage packet transfer within a local network. π
Packets might pass through undersea cables, satellites, or multiple networks to reach their destination. ππ°οΈ
Servers and Data Processing πΎ
When packets reach their destination:
Servers (powerful computers) process the request. For example:
A web server retrieves and sends a webpage. ππ€
A database server fetches or updates data. π
The server then sends the response back as packets. π¨
Receiving and Rendering Data π₯
The packets travel back to your device via the same or a different path:
Your device reassembles the packets into their original form. π οΈ
Applications (e.g., a browser or video player) interpret the data:
A web browser renders HTML, CSS, and JavaScript into a viewable webpage. π₯οΈπ
A video player streams the video content. π₯πΊ
Bonus Info π
Real-Time Communication:
For activities like video streaming or online gaming:- Data is sent and received continuously in real-time using protocols like UDP (User Datagram Protocol), which prioritizes speed over reliability. πβ‘
Security and Encryption:
To ensure secure communication:Encryption (like SSL/TLS) protects sensitive data from interception. π
Protocols like HTTPS, VPNs, and firewalls help safeguard information. π‘οΈ
Internet Workflow for Query Search
You must be wondering why the data packets travels to the nearest data centers ?
Google has data centers all over the world to:
Reduce Latency:
- A nearby server means the request doesn't have to travel far, making it faster.
Load Balancing:
- Google ensures traffic is distributed efficiently across their servers to avoid overloading any one data center.
Caching:
- Many Google data centers have cached copies of popular queries and results. If the data youβre requesting is already available at the nearest data center, it can respond immediately, avoiding unnecessary delays.
What Happens at the Nearest Data Center?
The nearest data center receives your request and processes it.
- If the result for your query (e.g., "chaicode") is already cached at that data center, it immediately sends back the response.
If it isnβt cached, the data center might:
Forward your request to another Google server where the full search index is stored.
Or fetch the necessary data from Googleβs core infrastructure and send it back to you.
Imagine youβre ordering pizza: ππ¦
You place your order at the nearest branch of a pizza chain (this is the nearest data center*). π π‘*
If the branch already has the pizza type you want ready (cached), they immediately deliver it to you. π΄ββοΈβ‘
If they donβt have it, they contact the main kitchen (core Google server) to prepare the pizza, then deliver it to you via the local branch*. πβ‘οΈπ π
Conclusion
If you have reached here means now you know everything related to the internet how it works its workflow youβre now equipped with internet more effectively. Keep exploring, as the digital world has endless opportunities waiting for you! ππ
If you liked this article do give it a like and share with your friendsβ€