Understanding the Networking Devices Behind the Internet

1.Introduction
Hello everyone! In this article, we are going to understand role of different devices used when a laptop, phone, or server communicates over the internet.
We have heard the names like modem, router, switch, firewall, and load balancer, etc. If not do not worry we will see these terms and understand what they do?
The goal is not just to memorize what a modem, router, switch, firewall, and load balancer are. The goal is to understand why these devices exist, what problem each solves, how they communicate, and how they fit into real-world production systems.
Let's not jump straight into technical terms like modems, routers, switches, firewalls, or load balancers. Instead, let's start with something much more fundamental.
What Exactly Is the Internet?
When we hear the word Internet, the first things that probably come to mind are websites, YouTube, social media, online games, video calls, and countless other services.
For example, when we open Google to search for something, watch a YouTube video, all these activities rely on a common underlying technology.
But what makes all these services possible?
The answer is the Internet — a global network of interconnected computer networks that communicate and exchange data.
In simple terms, the Internet connects billions of devices, including computers, smartphones, servers and other networking equipment, allowing them to exchange information across the world.
Now, let's consider an interesting question:
How does this global network actually reach our homes? How does a smartphone connected to Wi-Fi access a server located thousands of kilometres away? And how can multiple devices share a single internet connection?
Behind these everyday activities, an 8entire networking infrastructure* works together.
Let's explore how the Internet reaches our homes and how our devices connect to it, starting with the fundamentals.
2. Understanding how the internet reaches us : ISP, internet infrastructure, fiber optics, bandwidth, Wi-Fi and local networks.
Now that we understand what the Internet is, let's explore how it actually reaches our homes and offices.
When a laptop connects to the internet, several components and networking systems work together behind the scenes. Let's understand this journey step by step.
1.1 What is an ISP (Internet Service Provider)?
An Internet Service Provider (ISP) is a company that provides internet connectivity to homes, businesses and organizations.
Some popular ISPs in India include:
- Jio
- Airtel
- BSNL
- ACTFibernet
Now main question is But where does the internet connection actually come from?
ISPs operate or lease networking infrastructure that connects homes and businesses to their networks and, ultimately, the global internet.
ISPs operate or lease networking infrastructure that connects homes and businesses to their networks and, ultimately, the global internet.
This infrastructure includes:
- Fiber-optic cables.
- Networking equipment such as routers and switches.
- Data centers and network exchange connections.
- Submarine cables connecting different countries.
- Wireless communication infrastructure.
When we get a broadband connection (a wired or wireless internet connection provided by an ISP) installed at home, the ISP connects our home network to its network.\
For example: Suppose we get a Jio Fiber broadband connection installed at home.
- Jio brings a fiber-optic cable from its nearby network infrastructure to our home.
- The cable is connected to an ONT device installed at home.
- The ONT connects to our Wi-Fi router (sometimes both are combined into one device).
- The router creates a home network and allows our laptop, smartphone and smart TV to access the internet.
Think of an ISP as the service provider that gives our local network a connection to the wider internet.
1.2 How Does the Internet Physically Reach Our Homes?
The internet reaches homes through communication infrastructure that carries data between the ISP and customer premises.
There are three common ways:
1. Fiber-optic connection
Fiber optics is one of the most important technologies behind modern internet infrastructure.
Unlike traditional copper cables that transmit electrical signals, fiber-optic cables transmit data using light signals.
Fiber-optic cables transmit data using pulses of light through extremely thin strands of glass or plastic.
The basic process:
- Data is converted into optical signals.
- Light travels through the fiber-optic cable.
- Optical networking equipment receives the signals.
- At the home, an ONT (Optical Network Terminal) converts the optical connection into an Ethernet connection. Fiber connections offer high bandwidth and are widely used in modern broadband networks.
Why is fiber widely used?
- High data transmission capacity.
- Supports long-distance communication.
- Low signal loss over long distances.
- Reliable connectivity
2. Cable broadband
Uses coaxial cables(A coaxial cable is a type of shielded electrical cable that uses a central copper conductor surrounded by an insulating layer, a metallic shield, and an outer protective jacket to transmit high-frequency data, video, and radio signals with minimal interference) to transmit data using electrical signals. A cable modem communicates with the ISP's cable network.
3. Wireless broadband
Uses radio signals to provide internet connectivity, including 4G, 5G and fixed wireless access.
1.3 What is Bandwidth?
Bandwidth refers to the maximum data transfer rate that a network connection can support. It is generally measured in Mbps (Megabits per second) or Gbps (Gigabits per second).
Let's understand bandwidth through a simple real-life scenario.
Imagine a family of four sharing a single Wi-Fi connection at home:
One person is watching a 4K movie on Netflix.
Another is attending an online meeting.
Someone is downloading a large game on a laptop.
Another person is scrolling Instagram and watching reels.
All these activities are using the same internet connection simultaneously.
Now, why does the internet sometimes become slow when multiple devices are being used?
The answer is Bandwidth.
Bandwidth refers to the maximum amount of data that can be transferred through a network connection per second.
Think of an internet connection as a water pipe:
A wider pipe can carry more water at once.
A narrower pipe can carry less water at once.
Similarly, a connection with higher bandwidth can transfer more data per second. Let's understand with a numerical example. Suppose a family has a 100 Mbps broadband plan.
During a particular moment, the devices generate the following data transfer demands: Activity Bandwidth demand 4K video streaming 25Mbps Online meeting 5 Mbps Game download 50 Mbps Social media browsing 5 Mbps Total demand 85 Mbps
Remaining capacity:
100-85=15 Mbps
In this simplified example, the household is using 85 Mbps out of its available 100 Mbps capacity.
Now imagine the game download increases its demand to 70 Mbps.
The total demand becomes:
25+5+70+5=105 Mbps
The demand now exceeds the available 100 Mbps capacity. Some activities may experience slower speeds or buffering as the connection becomes congested.
This is why internet performance can be affected when multiple devices perform data-intensive activities simultaneously.
An important distinction: Mbps vs MB/s
These two units are commonly confused:
Mbps: Megabits per second (used for internet connection speeds).
MBps(Mb/s): Megabytes per second (commonly used for file download speeds).
Since 1 byte = 8 bits: [(100 Mbps)/8=12.5 MBps]
Therefore, a 100 Mbps connection theoretically supports a maximum download rate of 12.5 MB/s.
Actual speeds can be lower because of network overhead, congestion, Wi-Fi conditions and server limitations.
1.5 What is a Local Area Network (LAN)?
A Local Area Network (LAN) connects devices within a limited geographical area, such as a home, office, college or building.
For example, a home network might contain:
- A laptop.
- Two smartphones.
- A smart TV.
- A network printer. These devices can communicate through the same local network.
A LAN allows devices to:
- Share an internet connection.
- Exchange files.
- Access shared printers.
- Communicate with other devices locally. An interesting point: A LAN can function even without an internet connection.
For example, two computers connected to the same local network can exchange files even when the ISP connection is unavailable.
1.5 What is Wi-Fi? Is it the Same as the Internet?
No. These are two different concepts.
| Wi-Fi | Internet |
|---|---|
| Wireless networking technology | Global interconnected network |
| Connects devices to a local network | Connects networks worldwide |
| Can work without internet access | Requires network connectivity to reach external services |
Consider this scenario:
A laptop connects successfully to a home Wi-Fi network, but the ISP connection is down.
The laptop may still communicate with other devices on the local network, but websites such as Google won't load.
This demonstrates that Wi-Fi connectivity does not automatically mean internet connectivity.
What did we see till now:
- The internet is a global network of interconnected networks.
- ISPs provide connectivity between local networks and the wider internet.
- Bandwidth represents the maximum data transfer capacity of a connection.
- A LAN connects devices within a limited geographical area.
- Wi-Fi provides wireless local connectivity; it is not the internet itself.
3. Modem and ONT – How Does the Internet Connection Enter Our Home?
In the previous section, we understood how an ISP brings internet connectivity to our homes through fiber-optic cables, coaxial cables or wireless infrastructure.
But an important question remains:
How does the internet connection coming from the ISP become usable by our home network?
This is where devices like a Modem and ONT (Optical Network Terminal) come into the picture.
3.1 What is a Modem?
The word Modem comes from two words:
- Modulator: Converts digital data into signals suitable for transmission over a communication medium.
- Demodulator: Converts received signals back into digital data.
In simple terms, a modem acts as a communication bridge between our local network equipment and the ISP's network.
Let's understand with an example.
Suppose a broadband connection uses a coaxial cable to deliver internet to a home.
- A laptop generates digital data when opening a website.
- The router forwards the data towards the modem.
- The modem encodes the data into signals suitable for transmission over the cable network.
- The ISP's equipment receives and processes those signals.
- When data comes back, the modem converts the received signals into digital data for the home network. The same process happens in reverse when data travels from the internet towards the laptop.
Real-life analogy: Think of a modem as a translator. It helps two communication systems using different signaling methods exchange information.
3.2 What is an ONT (Optical Network Terminal)?
In modern fiber broadband connections, the device installed at home is commonly an ONT.
An ONT performs a similar connectivity role to a modem, but it works with optical fiber technology.
Unlike traditional cable modems, which communicate using electrical signals over coaxial cables, an ONT handles optical signals arriving through fiber-optic cables.
How Does It Work?
- The ISP sends data through fiber-optic cables using light signals.
- These optical signals reach the ONT (Optical Network Terminal) installed at home.
- The ONT converts the incoming optical signals into electrical signals that can be carried over an Ethernet connection.
- What is Ethernet? Ethernet is a technology used to connect devices within a local network through physical cables. For example, an Ethernet cable connects the ONT to the router and carries data between them.
- The router receives this data and distributes the internet connection to our devices through Wi-Fi or Ethernet cables.
3.3 Modem vs ONT: What's the Difference?
Both help establish connectivity with an ISP, but they support different access technologies.
| Modem | ONT |
|---|---|
| Used with technologies such as DSL and cable broadband | Used with fiber-optic broadband |
| Handles signals over copper-based communication media | Handles optical signals |
| Converts between digital data and transmission signals | Converts between optical and electrical signals |
| Common in cable/DSL connections | Common in FTTH connections |
Remember: An ONT is not technically the same device as a traditional cable modem, even though both serve as the endpoint of an ISP connection.
3.4 How Does a Modem/ONT Connect to the Router?
Now the next question is: what happens after the modem or ONT receives the internet connection?
The answer is simple: it passes the connection to a router(next topic), which distributes it across the local network.
3.5 A Simple Mathematical Example
Suppose an ISP provides a 100 Mbps broadband plan.
The ONT receives the internet connection and passes data to the router through Ethernet.
Now, if a laptop downloads a 50 MB file:
First, convert megabytes into megabits:
[ 50*8=400Mb]
Theoretical download time:
[ (400 Mb) / (100Mbps) = 4 seconds]
Theoretical result
The download would take approximately 4 seconds(maximum download speed) under ideal conditions.
In reality, the time may be higher due to network overhead, server limitations and congestion.
Important: A modem or ONT does not automatically increase internet speed. It provides the connection between the ISP's network and the home network.
4. Router – How Do Multiple Devices Share One Internet Connection?
In the previous section, we understood how a modem or ONT brings the internet connection into our home.
But here's an interesting question:
If a single internet connection enters our home, how can a laptop, smartphone, smart TV and other devices use it simultaneously?
This is where a Router comes into the picture.
3.1 What is a Router?
In a home setup, it connects our local network (LAN) to the ISP's network and directs data between our devices and external destinations.
Think of a router as a traffic manager that decides where incoming and outgoing data should go.
Imagine four devices connected to the same home Wi-Fi:
- Laptop opening GitHub.
- Smartphone watching YouTube.
- Smart TV streaming Netflix.
- Desktop downloading a file. The router manages the network traffic so that data reaches the correct device.
But how does it identify each device? This brings us to IP addresses.
3.2 What is an IP Address?
An IP (Internet Protocol) address is a logical address assigned to a device on a network so that it can be identified and communicate with other devices.
Think of it like a house address.
Just as a delivery person needs an address to deliver a parcel, network communication uses IP addresses to identify where data should go.
For example, a home network might have:
| Device | Private IP address |
|---|---|
| Laptop | 192.168.1.2 |
| Smartphone | 192.168.1.3 |
| Smart TV | 192.168.1.4 |
| Desktop | 192.168.1.5 |
| Router | 192.168.1.1 |
These are example addresses, actual addresses depend on the router's configuration.
Why do different devices have different IP addresses?
Because the router needs to distinguish between devices and deliver network traffic to the correct destination.
3.3 Public IP vs Private IP
This is one of the most important concepts in understanding how home networks access the internet.
Private IP address: Used to identify devices inside a local network.
Public IP address: Used to identify our network on the wider internet.
Let's understand with a real-life example.
Suppose a laptop connects to home Wi-Fi and opens Google.
- Laptop's private IP: 192.168.1.2
- Home router's public IP: 49.36.120.10 (illustrative example) The laptop uses its private IP within the home network, while the public IP allows the home network to communicate with external internet services.
| **3.4 What is DHCP?**Private IP | Public IP |
|---|---|
| Used inside local networks | Used across the internet |
| Usually assigned by the router | Usually assigned by the ISP |
| Can be reused in different networks | Must be globally unique at a given time for normal public routing |
3.4 What is DHCP?
DHCP provides the network configuration a device needs to communicate with other devices and access the internet.
It provides:
- IP address.
- Subnet mask.
- Default gateway.
- DNS server information.
Real-life example:
When a new smartphone connects to home Wi-Fi, the router's DHCP server can automatically assign it an address such as 192.168.1.6.
This avoids manually configuring every device.
In simple terms, DHCP works like a receptionist assigning a unique room number to each newly arriving guest.
3.5 What is NAT (Network Address Translation)?
Now comes one of the most interesting parts.
We have multiple devices with different private IP addresses, but our ISP typically provides a single public IP address for the home connection.
So, how can all these devices access the internet simultaneously?
The answer is NAT (Network Address Translation).
NAT allows the router to translate private IP addresses into a public IP address when devices communicate with external networks.
Real-life example:
Suppose three devices are connected to the same router:
| Device | Private IP |
|---|---|
| Laptop | 192.168.1.2 |
| Smartphone | 192.168.1.3 |
| Smart TV | 192.168.1.4 |
Our router has a public IP address: 49.36.120.10 (for example).
When these devices access the internet:
- The laptop sends a request to Google.
- The router translates the laptop's private IP and source port into its public IP and a mapped port.
- The request travels to Google's server.
- Google sends the response back to the router.
- The router uses its NAT translation table to identify the laptop and forwards the response to it. The same process happens for other devices.
The important point: NAT allows multiple devices in a home network to share one public IP address while maintaining their individual connections.
3.6 What is Packet Forwarding?
Whenever we access a website, watch a video or download a file, data travels across the network in smaller units called packets.
Packet forwarding is the process of directing these packets towards their intended destination.
Real-life example:
Suppose a laptop sends a request to open GitHub.
- The laptop sends a data packet to the router.
- The router checks the packet's destination IP address.
- It determines where the packet should be forwarded.
- The packet is sent towards the ISP network and eventually reaches its destination. When the response returns, the router forwards it to the correct device.
Think of the router as a post office that examines destination addresses and directs parcels towards the correct location.
Let's connect everything through one practical example.
Suppose a family has three devices connected to a home router:
- Laptop: Attending a Google Meet.
- Smartphone: Watching YouTube.
- Smart TV: Streaming Netflix.
Here's what happens behind the scenes:
- Each device receives a private IP address through DHCP.
- Each device sends data packets when accessing an internet service.
- The router forwards those packets towards the internet.
- NAT translates their private source addresses and ports for communication using the public IP.
- Incoming responses are mapped back to the correct devices.
what we have seen till now?
- Router: Connects networks and forwards data.
- IP Address: Identifies a device on a network.
- Private IP: Identifies devices within a local network.
- Public IP: Identifies the network on the wider internet.
- DHCP: Automatically assigns network settings to devices.
- NAT: Allows multiple devices to share a public IP address.
- Packet Forwarding: Directs data packets towards their destinations.
4. Hub vs Switch – How Do Devices Communicate Within a Local Network?
A Hub is a basic networking device that connects multiple devices within a LAN and sends incoming data to all its other connected ports.
It doesn't understand which device is the actual destination.
Real-life example:
Imagine three computers connected to a hub:
- Computer A
- Computer B
- Computer C When Computer A sends data to Computer B, the hub forwards that data to both Computer B and Computer C.
Computer C receives the data too, even though it isn't the intended destination.
This process is called broadcasting or flooding by a hub (more precisely, a hub repeats incoming signals to its other ports).
Problem with hubs:
- Unnecessary traffic reaches every connected device.
- Devices share the same collision domain.
- Hubs typically operate in half-duplex mode.
- Network efficiency decreases as traffic increases.
4.2 What is a Switch?
A Switch is a networking device that connects devices within a LAN and forwards data to the appropriate destination port.
Unlike a hub, a switch can identify devices using their MAC addresses(we will see the MAC address in section 4.3) .
Real-life example:
Consider the same three computers connected to a switch.
When Computer A sends data to Computer B:
- The switch receives the data.
- It checks the destination MAC address.
- It looks up its MAC address table.
- It forwards the data only through the port connected to Computer B.
Computer C doesn't receive that unicast frame.This makes switches more efficient for modern local networks.
Unicast communication — sending data from one device to one specific destination.
A Unicast Frame is an Ethernet frame (a unit of data sent over an Ethernet network) that travels from one specific device to another specific device.
For Example:
Suppose three computers are connected to a switch:
- Computer A wants to send data to Computer B.
- The frame contains Computer B's MAC address as the destination.
- The switch forwards the frame to Computer B's port.
- Computer C does not receive that frame.
Remember:
- Unicast = One sender → One receiver.
- Broadcast = One sender → All devices in the local broadcast network.
4.3 What is a MAC Address?
We understood that IP addresses identify devices at the network layer. Now let's understand another type of address: MAC Address (Media Access Control Address).
A MAC address is a hardware address associated with a network interface, used for communication within a local network.
For Example:
Laptop A: 00:1A:2B:3C:4D:5E
Laptop B: 00:1A:2B:3C:4D:6F
Each network interface generally has its own MAC address,means every network connection on a device has its own MAC address.
For example, a laptop's Wi-Fi connection and Ethernet connection can have different MAC addresses.
Why does a switch need MAC addresses?
Because a switch uses MAC addresses to identify which device is connected to which port.
4.4 What is an Ethernet Frame?
When data travels through an Ethernet network, it is organized into units called Ethernet Frames.
An Ethernet frame contains important information:
- Source MAC address: Where the frame came from.
- Destination MAC address: Where the frame should go.
- Payload: The actual data being carried.
- Error-checking information (FCS): Helps detect transmission errors.
For Example
Suppose Laptop A sends data to Laptop B.
The Ethernet frame contains Laptop A's MAC address as the source and Laptop B's MAC address as the destination.
The switch uses the destination MAC address to decide where to forward the frame.
4.5 Hub vs Switch: What's the Actual Difference?
Let's compare both devices:
| Feature | Hub | Switch |
|---|---|---|
| Working layer | Physical (Layer 1) | Data Link (Layer 2) |
| Data handling | Repeats incoming signals | Forwards Ethernet frames |
| MAC addresses | Doesn't examine them | Uses MAC addresses |
| Traffic | Sends to all other ports | Forwards based on MAC table |
| Collision domain | Shared | Separate per port |
| Usage | Mostly obsolete | Widely used |
One important technical detail: A switch doesn't always send data to only one device. If the destination MAC address is unknown, it floods the frame to other ports in the same VLAN. Broadcast frames are also flooded within that VLAN.
VLAN (Virtual Local Area Network) allows a physical network to be divided into multiple separate logical networks.
Some more terms is used above, that technical terms is used for information, those are part of core computer science subject COMPUTER NETWORKS. If you want to know, please explore yourself, we are here not going in the very much depth of computer networks topics.
4.6 How Does a Switch Learn MAC Addresses?
This is what makes a switch intelligent.
A switch maintains a MAC Address Table, which stores the relationship between MAC addresses and switch ports.
Example:
| MAC Address | Switch Port |
|---|---|
| AA:11:22:33:44:55 | Port 1 |
| BB:11:22:33:44:66 | Port 2 |
| CC:11:22:33:44:77 | Port 3 |
When a frame arrives, the switch:
- Reads the source MAC address and learns which port it came from.
- Checks the destination MAC address.
- Looks up the destination in its MAC address table.
- Forwards the frame through the appropriate port if the destination is known. This process allows switches to reduce unnecessary traffic.
Let's summarize this section:
- Hub: Repeats incoming signals to all other ports.
- Switch: Forwards Ethernet frames using MAC addresses.
- MAC Address: Identifies a network interface on a local network.
- Ethernet Frame: Carries data along with source and destination MAC addresses.
- MAC Address Table: Helps switches identify the correct destination port.
- Broadcasting: Sends traffic to all relevant devices within a network segment.
5. Firewall
Imagine an office building with security guards at its entry gates. They check who's entering, who's leaving, and whether they're authorized. A firewall does something similar for a **computer network(**A network is a group of two or more devices connected together so they can communicate and exchange data.).
A firewall is a network security system that monitors and filters incoming and outgoing network traffic according to predefined security rules.
5.1. How does a firewall work?
A firewall examines network traffic and checks whether it matches the configured rules.
- Allowed traffic: The connection is permitted.
- Blocked traffic: The connection is denied. For example, a company might allow employees to access approved websites but block unknown computers trying to connect to its internal servers.
5.2 Inbound vs Outbound Traffic
Firewall rules generally control traffic in two directions:
- Inbound traffic: Data or connection requests coming into a network from outside.
- Outbound traffic: Data or connection requests leaving a network for an external destination.
Server:A server is simply a computer or program that provides data, resources, or services to other computers (called clients) over a network.
For Example
Consider a company server:
- An unknown computer on the internet tries to connect to the company's internal database. The firewall blocks the inbound connection.
- An employee's computer tries to access an approved external website. The firewall allows the outbound connection.
An IP address identifies a device on a network, while a port number identifies a particular service or application running on that device.
Think of an IP address as the address of an office building and port numbers as the different departments inside it.
Here are some commonly used ports:
| Port | Common use |
|---|---|
| 80 | HTTP |
| 443 | HTTPS |
| 22 | SSH |
| 3306 | MySQL |
| 5432 | PostgreSQL |
For example, when a browser accesses an HTTPS website, it generally connects to the server using port 443.
Let's take a simple example.
Imagine someone opens YouTube on a laptop.
- The laptop sends a request to YouTube's server to load the website.
- The request uses HTTPS, which keeps communication secure.
- HTTPS normally uses port 443 to communicate with the server.
- The firewall checks the connection. If port 443 is allowed, the request can pass. Think of it this way:
- IP address = Address of the building (server).
- Port 443 = Entry gate used for secure web communication.
- Firewall = Security guard deciding whether that gate can be used. So, when a firewall allows port 443, people can access HTTPS websites such as YouTube and Google.
A firewall can use port numbers to decide which services should be accessible.
5.3 Firewall Rules: A Practical Example
Let's consider a company hosting a web application with three components:
- A web server that customers can access.
- A database server containing private company data.
- An administrator(person responsible for managing and maintaining a company's servers) who needs SSH access to manage the server. The firewall could be configured with rules like these:
| Traffic | Rule |
|---|---|
| Internet → Web server, port 443 | Allow |
| Internet → Database, port 5432 | Block |
| Internet → SSH, port 22 | Allow only from trusted administrator IPs |
| Web server → Database, port 5432 | Allow |
SSH (Secure Shell) is a secure way to remotely access and control a server using a terminal (command line).
For example:
Imagine a company hosts its website on a server in a data centre in Mumbai. An administrator sitting in Bengaluru needs to:
- Restart the server.
- Install software.
- Check server logs.
- Fix an issue with the website. Instead of physically visiting the data centre, the administrator connects to the server remotely using SSH.
Port 22 is the standard port used by SSH.
That's why a company might configure its firewall to allow SSH access only from the administrator's trusted IP address, rather than allowing everyone on the internet to connect.
This configuration lets customers access the application while preventing direct public access to the database.
5.4 Why are Firewalls Important in Production?
In real-world applications, firewalls help organizations:
- Prevent unauthorized access to servers.
- Restrict access to sensitive services such as databases.
- Control which ports are exposed to the internet.
- Reduce the risk of malicious network connections.
- Separate public-facing systems from internal infrastructure.
A firewall doesn't simply block all incoming traffic. It applies security rules to decide which network connections are permitted and which are denied.
6. Load Balancer
Imagine an online shopping website during a big sale. Thousands of customers are trying to browse products, search for items, and place orders at the same time.
If every request goes to a single server, that server may become overloaded, resulting in slow responses or even downtime.
So, how do companies handle such heavy traffic?
The answer is a Load Balancer.
A load balancer distributes incoming requests across multiple servers so that no single server has to handle all the traffic.
6.1 How does a Load Balancer work?
Suppose an e-commerce application has three servers:
Server 1
Server 2
Server 3 When customers send requests, the load balancer distributes those requests among the available servers.

For example:
- Customer A's request → Server 1
- Customer B's request → Server 2
- Customer C's request → Server 3
- Customer D's request → Server 1 This helps distribute the workload instead of putting all the pressure on one server.
6.2 Round-Robin Algorithm
One simple method used by load balancers is Round Robin.
It distributes incoming requests to servers one by one in a repeating order.
For example, with three servers:
| Incoming request | Assigned server |
|---|---|
| Request 1 | Server 1 |
| Request 2 | Server 2 |
| Request 3 | Server 3 |
| Request 4 | Server 1 |
| Request 5 | Server 2 |
| Request 6 | Server 3 |
After reaching the last server, the process starts again from the first server.
This is called Round Robin.
6.3 Health Checks
What happens if Server 2 suddenly crashes?
A load balancer should not continue sending requests to a server that is unavailable.
This is where health checks come in.
A health check is a periodic check performed by the load balancer to determine whether a server is working properly.
For example:
- Server 1 → Healthy
- Server 2 → Unhealthy
- Server 3 → Healthy The load balancer stops sending new requests to Server 2 and distributes traffic between Server 1 and Server 3.
6.4 What is a Reverse Proxy?
A reverse proxy is a server that receives requests from clients and forwards them to backend servers.
For example, when a customer opens an e-commerce website, the request first reaches the reverse proxy. It then forwards the request to the appropriate backend server.
A load balancer can also work as a reverse proxy by receiving client requests and distributing them across multiple backend servers.
There is also a term forward proxy,
Forward proxy: Sits in front of clients on a private or internal network to mediate their outbound requests to the public Internet.
6.5 Layer 4 vs Layer 7 Load Balancing
Load balancers can distribute traffic at different networking layers.
| Layer 4 | Layer 7 |
|---|---|
| Works at the transport layer | Works at the application layer |
| Uses IP addresses and port numbers | Can inspect HTTP details such as URLs and headers |
| Does not need to understand the HTTP request content | Can make decisions based on HTTP request content |
Example:
Imagine an application has two services:
- /products → Product service
- /orders → Order service A Layer 7 load balancer can inspect the URL and route requests to the appropriate service.
A Layer 4 load balancer generally distributes connections using information such as IP addresses and port numbers, without inspecting the HTTP URL.
6.6 What is Horizontal Scaling?
Suppose an application initially runs on one server. As the number of users increases, that server may struggle to handle all requests.
One solution is to add more servers and distribute traffic among them.
This is called horizontal scaling (increasing capacity by adding more machines).
For example:
- Initially: 1 server handles 1,000 requests.
- Later: 3 servers share the workload.
The exact number of requests each server can handle depends on the application and server capacity, but adding servers can increase the system's overall capacity.
Summary: A load balancer distributes incoming traffic across multiple servers, checks server health, and helps applications handle increasing numbers of users.
It improves availability, scalability, and reliability.
7.Complete Network Architecture
Until now, each networking component has been discussed separately: routers, switches, modems, ONTs, firewalls, and load balancers.
But in reality, these components work together to enable communication between devices and applications.
Let's understand this through two practical examples.
7.1 How a Home Network Works
Consider a home where four devices are connected to a Jio Fiber internet connection:
- Laptop
- Smartphone
- Smart TV
- Desktop computer
How does each device access the internet through a single connection?
Let's follow the connection step by step:
- ISP: Jio provides an internet connection to the home through a fiber-optic cable.
- ONT: The Optical Network Terminal receives the optical signal and converts it into an Ethernet signal.
- Router: The router connects the home network to the ISP network and provides connectivity to multiple devices.
- DHCP: The router automatically assigns private IP addresses to connected devices.
- Wi-Fi / Ethernet: Devices connect to the router wirelessly through Wi-Fi or physically through Ethernet cables.
- NAT: When multiple devices access the internet, the router translates their private IP addresses so they can share the home's public IP address.
An important point: Even if the internet connection stops working, devices connected to the same home network can still communicate locally, provided the router and local network are functioning.
For example, a laptop might still communicate with a network printer.
7.2 How a Production Web Application Works
Now consider a real-world application such as an e-commerce website.
Thousands of customers visit the website to browse products, add items to their carts, and place orders.
A single server may struggle to handle all these requests. Therefore, production applications use multiple networking and infrastructure components.
Let's understand the flow.
Step 1: User Sends a Request
A customer opens an e-commerce website in a browser.
For example:
The browser sends an HTTPS request to the website's server, generally using port 443.
Step 2: Firewall Checks the Traffic
The incoming request passes through the firewall.
The firewall checks whether the connection is permitted according to its security rules.
For example, it may allow HTTPS traffic on port 443 while blocking unauthorized access to the database.
Step 3: Load Balancer Distributes Requests
After passing the security checks, the request reaches the load balancer.
The load balancer distributes incoming requests across available application servers.
For example:
- Request 1 → Application Server 1
- Request 2 → Application Server 2
- Request 3 → Application Server 3 This prevents a single server from handling all incoming requests.
Step 4: Application Server Processes the Request
The selected application server runs the backend application.
For example, when a customer opens the products page, the backend processes the request and retrieves the required product information.
Step 5: Database Returns the Data
The application server communicates with the database to retrieve product details.
The database is generally kept private and is not directly accessible from the public internet.
For example, it may return:
- Product name
- Price
- Description
- Available stock
Step 6: Response Reaches the Browser
The application server prepares the response and sends it back through the network to the customer's browser.
The browser then displays the products on the screen.
Note*: This is a simplified architecture. Real production systems may include DNS, CDNs, caching systems, multiple firewalls, private networks, and other components.*
8. Conclusion
Networking is the foundation that makes communication between devices, servers, and applications possible.
From connecting a home to the internet to handling millions of requests in a production application, every networking component plays an important role.
Routers, switches, firewalls, and load balancers work together to make communication efficient, secure, and reliable.
Understanding these concepts provides a strong foundation for exploring how modern applications and internet infrastructure work.
Comments
Join the discussionNo comments yet. Be the first to comment.



