Skip to main content

Command Palette

Search for a command to run...

Understanding Network Devices

Updated
3 min read

Before APIs, servers, and cloud deployments — data has to travel through physical network devices.

Let’s understand the core ones, simply.

How the Internet Reaches Your Home or Office

At a very high level, the internet doesn’t magically appear in your laptop.
It travels through cables, devices, and rules.

Basic flow:

Internet → Modem → Router → Switch → Your Devices

1. What is a Modem?

A modem connects your local network to the internet.

  • Internet signals coming from your ISP are not in a format your devices understand

  • The modem converts those signals into usable digital data

  • Without a modem, you simply cannot access the internet

Analogy:
Translator between your ISP and your home

Diagram: Internet → Modem → Router → Devices

2. What is a Router?

A router decides where data should go.

  • It receives data from the modem

  • Sends it to the correct device (laptop, phone, server)

  • Uses IP addresses to make routing decisions

  • Creates a local network (LAN)

Important:

  • Modem = internet connection

  • Router = traffic direction

Analogy:
Traffic police at a junction

Router directing traffic to multiple devices

3. Hub vs Switch (Local Network Devices)

Hub (Old & Dumb)

  • Sends data to all devices

  • No idea who actually needs it

  • Causes collisions and slow networks

Switch (Smart & Modern)

  • Sends data only to the intended device

  • Learns MAC addresses

  • Faster and more secure

Key difference:

Hub broadcasts, Switch delivers.

Analogy:

  • Hub → shouting in a room

  • Switch → delivering to the correct mailbox

Hub vs Switch packet broadcast comparison

4. What is a Firewall?

A firewall controls what is allowed in and out of a network.

  • Blocks malicious traffic

  • Allows trusted requests

  • Can be hardware or software

  • Rules are based on IP, port, protocol

Security lives here.

Analogy:
Security gate checking ID

Firewall placement between internet and internal network

5. What is a Load Balancer?

A load balancer distributes traffic across multiple servers.

  • Prevents one server from getting overloaded

  • Improves availability and performance

  • Essential for scalable systems

Used heavily in:

  • Production web apps

  • Microservices

  • Cloud infrastructure

Analogy:
Toll booth directing cars to multiple lanes

Load balancer distributing traffic to servers

6. How All These Devices Work Together (Real World)

For a typical web application:

User
 ↓
Internet
 ↓
Firewall
 ↓
Load Balancer
 ↓
Web Servers
 ↓
Database

At home or office:

Internet → Modem → Router → Switch → Devices

Each device does one job well — and together, they make the network reliable.

End-to-end network architecture for a web application

Why Software Engineers Should Care

Even if you write only code:

  • APIs fail because of firewalls

  • Servers crash without load balancing

  • Latency issues often come from routing

  • Production bugs are sometimes network bugs

Understanding hardware makes you a better backend and system engineer.