Skip to main content

Command Palette

Search for a command to run...

Before Learning AWS: Understanding Internet Infrastructure, ISP, CSP, Scaling, Load Balancers, and DNS

Updated
12 min read
Before Learning AWS: Understanding Internet Infrastructure, ISP, CSP, Scaling, Load Balancers, and DNS

1. Introduction

Modern applications such as social media platforms, e-commerce websites, banking apps, and streaming services serve millions of users every day. Behind these applications is a complex infrastructure that allows them to run reliably, scale with traffic, and remain secure.

In earlier days, companies had to purchase physical servers, set up their own data centers, maintain networking equipment, and handle hardware failures themselves. This required large investments and dedicated infrastructure teams.

Cloud computing has changed this completely. Today, organizations can run applications on cloud platforms like AWS without owning any physical infrastructure.

However, before learning AWS services directly, it is important to understand how applications work on the internet and what infrastructure components are involved. When students understand these fundamentals, learning AWS becomes much easier because they can see how AWS services replace traditional infrastructure components.

This guide explains the complete journey starting from how users access applications on the internet, how infrastructure supports those applications, and how AWS provides these capabilities through cloud services.


2. Internet & Infrastructure Basics

Before understanding cloud platforms, we must first understand how users connect to applications through the internet.

When a user opens a website such as:

www.example.com
  • The request travels through multiple systems before reaching the application server.

  • The typical flow looks like this:

User Device
   ↓
Internet Service Provider (ISP)
   ↓
Internet
   ↓
DNS
   ↓
Load Balancer
   ↓
Application Servers
   ↓
Database
   ↓
Storage

Each component plays a specific role in delivering the application to the user.


3. Internet Service Provider (ISP)

An Internet Service Provider (ISP) is a company that provides internet connectivity to individuals and organizations.

Examples of common ISPs include:

  • Airtel

  • Jio

  • BSNL

  • ACT

When you connect your home Wi-Fi or office network to the internet, you are using services provided by an ISP.

3.1 What ISPs provide

An ISP typically provides:

  • Internet connectivity through fiber or broadband

  • Public IP addresses

  • Network routing to the global internet

  • Bandwidth plans such as 100 Mbps or 1 Gbps

  • Basic network security in some cases

3.2 Real-world example

Imagine a user sitting at home and opening Amazon on their laptop. The laptop connects to the home Wi-Fi router, which connects to the ISP network. The ISP then routes the request through the internet to reach Amazon’s infrastructure.

Without an ISP, a user cannot access websites or cloud services.


4. Cloud Service Provider (CSP)

While ISPs provide internet connectivity, Cloud Service Providers provide the infrastructure that runs applications.

A Cloud Service Provider (CSP) offers computing resources over the internet.

Examples include:

  • Amazon Web Services (AWS)

  • Microsoft Azure

  • Google Cloud Platform (GCP)

Instead of companies purchasing servers and maintaining data centers, they can rent computing resources from cloud providers.

4.1 Services provided by cloud platforms

Cloud providers typically offer:

  • Virtual servers

  • Storage systems

  • Databases

  • Networking infrastructure

  • Security tools

  • Monitoring systems

4.2 Simple analogy

Think of it like this:

  • ISP is the road

  • Cloud provider is the city

  • Servers and databases are the buildings inside the city


5. Core Infrastructure Components

  • Infrastructure refers to the complete backend setup required to run an application.

  • A typical application infrastructure contains several components working together.

These include:

  • Web servers

  • Application servers

  • Databases

  • Storage systems

  • Networking

  • Security controls

Each component plays a specific role in ensuring the application works properly.

Web Server + Application Server + Database + Storage + Networking + Firewall


5.1 Web Server

  • A Web Server is the first system that receives HTTP or HTTPS requests from users.

  • When someone types:

www.example.com

The request first reaches the web server.

Common web servers include:

  • Nginx

  • Apache

  • IIS

5.1.1 Responsibilities of a web server

A web server performs the following tasks:

  • Handles HTTP / HTTPS requests

  • Serves static content (HTML, CSS, images, JS)

  • Forwards dynamic requests to the application server

  • Handles SSL/TLS encryption (HTTPS)

5.1.2 Example

Suppose a user opens a company website.

The web server checks:

  • Is this a static file? → Return it directly (HTML, CSS, images).

  • Is this dynamic content? → Forward the request to the Application Server.

  • The web server is responsible only for handling client requests and serving static content. Business logic is handled by the application server.

  • It only manages incoming traffic and forwards requests when needed.


5.2 Application Server

  • The application server runs the core logic of the application.

  • Examples of application frameworks include:

  • Java Spring Boot

  • Node.js

  • Python Django

  • .NET applications

5.2.1 Responsibilities

Application servers handle tasks such as:

  • Processing user logins

  • Validating input data

  • Handling business logic

  • Communicating with databases

  • Generating responses for users

5.2.2 Real-world example

User searches for “Mobiles Under ₹20,000”.

Step 1 → Request reaches the Web Server
Step 2 → Web Server forwards the request to the Application Server
Step 3 → Application Server reads the search keyword
Step 4 → Application Server queries the Database
Step 5 → Database returns matching products
Step 6 → Application Server formats the results and sends response back to the user

The Application Server is the brain of the system because it handles business logic, processes data, and communicates with the database.


5.3 Database

A database stores structured data required by the application.

Examples include:

  • MySQL

  • PostgreSQL

  • Oracle

  • SQL Server

  • DynamoDB

  • MongoDB

5.3.1. What databases store

Databases typically store:

  • User accounts

  • Orders and transactions

  • Product catalogs

  • Application settings

5.3.2 Example

In an online shopping application, the database stores information such as user profiles, order history, and product inventory, Payment information

Important: Databases are usually kept in private networks for security. They are NOT directly accessible from the internet.


5.4 Storage Systems

  • Storage systems store files rather than structured data.

  • Examples of stored files include: Images ,Videos ,Documents, Logs and Backups

  • Storage types include:

  • Block Storage (like disk attached to server)

  • Object Storage (S3 type)

  • File Storage (shared filesystem)

5.4.1 Example

When a user uploads a profile picture to a social media platform.

  • The image is stored in object storage

  • The image URL is saved in the database


5.5 Networking

Without networking:

  • Servers cannot communicate

  • Applications cannot talk to databases

  • Users cannot access the system

Networking controls how traffic flows inside and outside your infrastructure.

Networking involves elements such as: Virtual networks , Subnets , Routing rules ,IP addressing and Internet gateways

5.5.1. VPC (Virtual Private Cloud)

A VPC is a private network inside the cloud.

It acts as a network boundary for your infrastructure.

Think of it as your private data center inside the cloud.


5.5.2. Subnets (Public & Private)

Inside a VPC, we create subnets.

Public Subnet

  • Connected to the Internet

  • Used for: Load Balancer ,Web Servers

Private Subnet

  • No direct internet access

  • Used for: Application servers , Databases


5.5.3. Route Tables

Route tables decide:

“Where should network traffic go?”

Example:

  • Internet traffic → Internet Gateway

  • Private traffic → Internal routing


5.5.4. Internet Gateway

Allows communication between:

VPC ↔ Internet

Used for public servers.


5.5.5. NAT Gateway

  • Used when: Private servers need internet access (for updates, APIs)

  • But should NOT be directly accessible from the internet.


5.5.6. DNS & IP Addressing

DNS converts:

www.example.com → IP address

Every server has:

  • Private IP (inside network)

  • Sometimes Public IP (internet-facing)

  • Networking ensures that servers, databases, and storage systems communicate securely.


5.6.Security (Firewall)

A Firewall controls which systems are allowed to communicate with each other.

In cloud environments, firewall rules allow only necessary traffic and block everything else.

This follows the principle of: Least Privilege Access (Allow only what is required)

5.6.1 Example

For a secure 3-tier application:

  • Allow users to access the Load Balancer through HTTPS (Port 443)

  • Allow Load Balancer to communicate with Application Servers

  • Allow Application Servers to communicate with the Database

  • Block direct internet access to the Database

  • This ensures: Users cannot directly attack the database.

5.6.2. Types of Firewall in Cloud

1. Security Groups (Instance Level)

  • Attached to servers

  • Acts like a virtual firewall

  • Controls inbound & outbound traffic

2. Network ACL (Subnet Level)

  • Applied at subnet level

  • Controls traffic entering or leaving subnet

3. WAF (Web Application Firewall)

  • Protects against:

    • SQL injection

    • Cross-site scripting (XSS)

    • HTTP attacks


6. Scaling

  • As applications become popular, the number of users increases. The system must handle more traffic.

  • Scaling refers to increasing system capacity to support more users.

  • More users = More requests = More load on servers.

  • If the system cannot handle the load:

  • The website slows down, servers crash, and users leave. Therefore, scaling is essential.

There are two main types of scaling.

1. Vertical Scaling
2. Horizontal Scaling


6.1 What is Vertical Scaling?

  • Vertical scaling means increasing the power of a single server.

  • Instead of adding new servers, we upgrade the existing one.

Example

Suppose your application runs on:

1 Server
2 CPU
4 GB RAM
  • As traffic increases, users start complaining about slowness.

  • You upgrade the same server to:

1 Server
8 CPU
32 GB RAM
  • Now the server can handle more users.

6.2 What is Horizontal Scaling?

  • Horizontal scaling means adding more servers instead of upgrading one server.

Example:

1 Server → 3 Servers → 10 Servers 

Traffic is distributed across multiple servers.

6.2.1 Real-World Example

Imagine an e-commerce website during a festival sale.

  • Normal days: 1 server is enough

  • Festival sale: Traffic increases 10x

  • Instead of upgrading one huge server, the company adds: 10 servers

Now traffic is shared across them.

6.2.2. When Do We Use Horizontal Scaling?

Horizontal scaling is used when:

  • Applications have very high traffic

  • Millions of users access the system

  • High availability is required

  • Downtime is unacceptable

6.2.3. Why Most Large Companies Prefer Horizontal Scaling

Companies such as Netflix, Amazon, and Instagram

cannot rely on a single powerful server.

If one server fails:

  • Other servers continue running

  • Users do not even notice

This makes the system:

  • More reliable

  • More scalable

  • More fault-tolerant


7. What is a Load Balancer?

  • When we use horizontal scaling and have multiple servers, we need a way to distribute traffic. This is where a Load Balancer comes in.

  • A Load Balancer acts as a single entry point for users.

  • Users do NOT connect directly to application servers.

  • They connect to the Load Balancer, which forwards traffic to servers.

7.1 Responsibilities of a Load Balancer

A load balancer:

  • Receives incoming requests

  • Distributes traffic across multiple servers

  • Monitors server health

  • Automatically removes unhealthy servers

Example:

Suppose there are 3 application servers:

Server 1
Server 2
Server 3

Requests are distributed like this:

Request 1 → Server 1
Request 2 → Server 2
Request 3 → Server 3
Request 4 → Server 1
Request 5 → Server 2

This prevents any single server from being overloaded.

7.2 What Happens If a Server Fails?

If Server 2 crashes:

  • Load balancer detects failure

  • Stops sending traffic to Server 2

  • Sends traffic only to Server 1 and 3

Users continue using the application without interruption.

This is called High Availability.


8. DNS (Domain Name System)

Users cannot remember numerical IP addresses easily.

Instead of typing something like:

52.21.54.101

users access websites using domain names such as:

www.kkdevops.com

DNS converts domain names into IP addresses.

Example

When a user enters a domain name:

  1. The browser queries a DNS server.

  2. DNS returns the IP address of the server or load balancer.

  3. The browser connects to that address.


9. Request Flow (Real-World Example)

Let us follow the journey of a request.

  1. A user opens www.example.com.

  2. The browser sends a DNS query.

  3. DNS returns the IP address of the load balancer.

  4. The request reaches the load balancer.

  5. The load balancer forwards the request to an application server.

  6. The application server processes the request.

  7. The database may be queried.

  8. Files may be retrieved from storage.

  9. The response is returned to the user.