Skip to content
Computer Networks5 min read

Complete Guide on Working of Internet

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โ€™r...

  • internet
  • ChaiCode
  • http
  • https
  • dns
  • Browsers
  • data

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.

Difference between Fiber optic cable and Copper wire - GeeksforGeeks

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.

cellular data vs wifi | Difference between cellular and wifi

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:

  1. The browser knows the address to send the data. It prepares the data along with metadata (extra information) and divides it into packets. โœ‚๏ธ๐Ÿ“ฆ

  2. 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. ๐Ÿ”€

  3. 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:

  1. Your device reassembles the packets into their original form. ๐Ÿ› ๏ธ

  2. 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. ๐Ÿ›ก๏ธ

You must be wondering why the data packets travels to the nearest data centers ?

Google has data centers all over the world to:

  1. Reduce Latency:

    • A nearby server means the request doesn't have to travel far, making it faster.
  2. Load Balancing:

    • Google ensures traffic is distributed efficiently across their servers to avoid overloading any one data center.
  3. 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โค

Connect with me on ๐Ÿ‘‡

LinkedIn

Twitter

Originally published on Hashnode