The title of the article might scare (a bit) developers. We can think about why we should care about the hardware? We write code, compile it, debug it, and deploy it on “production”. Here comes the tricky part
— The “Production“. Production is essentially a server (EC2, Heroku, Render), and a server (NodeJS, Java, Python) is a specialized software that requires continuous hosting on a computer (24/7). This “Computer“ requires some hardware to connect internet.
So, it is important know about the hardware that powers the internet. We are not going into the
Rabbit Hole, trust me😉.
How Does The Internet Reach Our Home or Office?
While it may seem magic, there is a complete science behind how internet gets to us. Before the internet, we must understand the network. The backbone of the internet is The Network. The network is a group of connected computers that can share data. Computers in a network are in a social bond, think like our neighbours, we can exchange informations to each other.
The “Internet“ is an extensive collection of networks that are connected to each other. We can say the internet as interconnected network.
The Flow: ISP → Modem → Router → Firewall → Switch → End Device
You can imagine the Postal System, the internet is the world; Your ISP is the regional distributor; your home/office is the destination address.
The Modem: The Translator
The core responsibility of a modem is the conversion of the signal. Technically known as Modulation/Demodulation. A Modem is connected via an ISP (Internet Service Provider).
How it works: It receives the analog signal from your ISP (via Fiber, Coax, and Phone Line) and converts it into a digital signal (Ethernet) that the computer understands. It acts as a bridge between your ISP and your Local Area Network. Now, you may think that nowadays, we are connected wirelessly (WiFI), right? Here comes the router in the picture; the router broadcasts Ethernet wirelessly.
Analogy: You can picture this as a Translator. Imagine a diplomat (your router) who wants to speak with a foreign official (the ISP). The modem is the interpreter standing between them, translating French (Analog) to English (Digital) in real-time.
Dev Context: The Modem provides Public IP. If your modem is off, you have no physical access to the outside world. Means, no npm install, no deployment😆.
The Router: The Traffic Guard
The main function of a router is the path selection of traffic. A router is device that connect two or more networks or networks of networks.
How it works: The router has the ability to analyze incoming data. This data has header information; after analysis, it finds the address of the destination in the routing table — a list of paths to various network destinations. Then connect to the destination and transmit the data packets to the higher leap. The leap might be the last destination or another router.
Analogy: Think of a router as an air traffic controller and a data packet as an aircraft going to a different airport (or network). Just as a plane needs to be guided by ATS (Air Traffic Controller) data packet is guided by a router.
Dev Context: This is where NAT exists. NAT is responsible for converting your local IP address 192.168.1.2 to the Public IP address.
The Hub: The “Dumb” Device
The hub is a Layer - 1 (Physical) device. Imagine you are shouting a message in the office middle of everyone, hoping the right person hears it😅. The hub works exactly like this. It receives data and blindly repeats all others. This causes traffic jams (collisions).
How it works: A hub primarily has two main functions. Receiving data — The hub collects data sent by other devices or nodes. Transmitting data — The hub broadcasts that data to all devices connected to it.
A hub can only send or receive data at one time, which means it cannot perform both functions simultaneously. This is the primary reason why we prefer to use switches.
The Switch: The “Smart” Device
A switch is a Layer-2 (Data Link) device. You go to the right person’s desk and whisper the message. The switch is a “Smart Device”. It know MAC address of connected devices. If data is meant for Device A, the switch sends it only to Device A.
How it works: The switch can transmit and receive data simultaneously. A switch only sends data to the single device it is intended for, which may be another switch, a router, or a user’s computer, not to a network of multiple devices.
HUB VS SWITCH
| HUB | SWITCH |
|---|---|
| A Hub is a Layer-1 (Physical) device | A switch is a Layer-2 (Data Link) device. |
| Cannot transmit and receive data simultaneously | Can transmit and receive data simultaneously |
| Hub can have 4 to 12 ports | While the switch has 24 to 48 ports |
| Hub cannot filter data packets | Switch can filter data packets |
Dev Context: In this modern era, data centers use switches. It reduces the “collision domains” and ensures higher performance for internal services, such as your App server communicating with your database server.
The Firewall: The “Security” Guard
The firewall is a security defence system that controls network traffic based on a set of defined rules. The firewall decides which traffic can pass through. They can be built on hardware, software, or a combination of both.
How it works: It verifies the packet header (source, destination, port) against a set of defined security rules.
Analogy: Firewall is our security guard. A guard checks for your ID. “Are you on the guest list?” (Allow list). “Are you carrying weapons?” (Malware inspection). If you aren’t in the list, he won’t allow you.
Dev Context: If you ever get your hands dirty with AWS/Azure, this is your Security Group. When you cannot SSH into a server, it’s usually because the firewall (Port 22) is blocking you.
The Load Balancer: The Scalability Manager
The load balancer is like a manager. They distribute capacity during high traffic times and increase the reliability of the application.
How it works: When a request arrives from a user, the load balancer assigns the request to a given server, and this process repeats for each request. Load balancers determine which server should handle each request based on a number of different algorithms.
Analogy: Imagine you are standing in check out line at the mall with 4 checkout lines, only one (Server) is open. All customers must get into the same line. Naturally, it will take a long time to finish paying for items. Now, the manager (Load Balancer) directs to open all 4 checkout lines and distribute customers accordingly. Load balancing essentially accomplishes the same thing. By dividing user requests among multiple servers, the user wait time is vastly cut down.
Dev Context: This is vital for Horizontal Scaling. The Load Balancer stops sending traffic to a crashed server and routes it to healthy servers.
The Real-World Architecture:
The Flow:
👉 User request hits the Modem (Physical Entry)
👉 Router directs it to the data center network.
👉 Firewall checks if the request is on a valid port (e.g., 443 HTTPS).
👉 Load Balancer receives the request and picks Server_03.
👉 Switch physically moves the packet to the rack where Server_03 lives
Dev Context: If you understand this hardware, it helps you debug latency, configure VPS correctly, and design an efficient system.
Conclusion:
From the Modem translating raw signals in a basement, to the Router and Switch acting as the traffic cops of the local network, to the Firewall and Load Balancer standing guard at the gates of a data center—every request your application handles has survived a complex gauntlet of hardware.
Understanding infrastructure transforms you from a coder who writes syntax into an architect who understands systems. The "Cloud" isn't magic; it is simply a massive, well-orchestrated collection of these exact devices, running at scale.
So, the next time you push code to production, remember the silent hardware heroes that carry your logic from a server rack to a user's screen. You build the digital world, but these devices provide the ground it stands on.
Resources:
https://www.ibm.com/think/topics/networking
https://www.cisco.com/site/us/en/learn/topics/small-business/how-does-a-router-work.html
https://www.cbtnuggets.com/blog/technology/networking/the-3-components-of-a-network-explained
https://www.f5.com/glossary/load-balancer
https://www.digitalocean.com/community/tutorials/an-introduction-to-haproxy-and-load-balancing-concepts
https://www.checkpoint.com/cyber-hub/network-security/what-is-firewall/
https://www.geeksforgeeks.org/computer-networks/difference-between-hub-switch-and-router/
https://www.cloudflare.com/learning/network-layer/what-is-a-router/






Top comments (0)