Cloud Real World Concepts

Real World Concepts Very Important

Understanding theory is useful, but the real value comes from knowing how things work in real applications. In this section, you will learn how a web app runs on cloud and the basic 3 tier architecture used in most systems.

1. How a Web App Runs on Cloud

Let us understand step by step what happens when a user opens a website.

Step 1 User enters a domain name
A user types a website name like example.com in the browser.

Step 2 DNS converts domain to IP
The domain name is converted into an IP address using DNS so the browser knows where to send the request.

Step 3 Request goes to server
The request is sent over the internet to a server running in the cloud.

Step 4 Load balancer distributes traffic
If the application is large, a load balancer distributes the request to one of many servers.

Step 5 Backend processes the request
The backend application processes the request and may interact with a database.

Step 6 Database returns data
The database sends the required data back to the backend.

Step 7 Response sent to user
The backend sends the response back to the browser, and the user sees the result.

Example in real life
If you open a wallpaper website
The frontend loads images and UI
The backend handles search requests
The database stores image data

2. Basic 3 Tier Architecture

Most web applications follow a 3 tier architecture. This divides the system into three main parts.

Frontend
Backend
Database

1. Frontend

The frontend is what users see and interact with.

It includes
HTML
CSS
JavaScript

Example
A webpage showing images, buttons, and search bar

Role
Displays data to users
Sends requests to backend

2. Backend

The backend is the logic part of the application.

It handles
Business logic
APIs
Authentication
Processing requests

Example
A Node.js server handling search queries and returning results

Role
Processes user requests
Communicates with database

3. Database

The database stores all the data of the application.

It can store
User data
Images
Application data

Examples
MongoDB
MySQL

Role
Stores and retrieves data

3. How 3 Tier Architecture Works Together

Step 1 User interacts with frontend
Step 2 Frontend sends request to backend
Step 3 Backend processes request
Step 4 Backend queries database
Step 5 Database returns data
Step 6 Backend sends response
Step 7 Frontend displays result

4. Why 3 Tier Architecture is Important

Separation of concerns
Each part has a clear role

Scalability
You can scale frontend, backend, or database separately

Maintainability
Easy to update and manage

Security
Database is not directly exposed to users

5. Simple Example

Imagine a shopping website

Frontend shows products
Backend handles orders and payments
Database stores product and user data

When a user searches for a product
Frontend sends request
Backend processes it
Database returns matching products
Frontend displays results

Summary

A web app in cloud works through a flow of request and response

DNS helps find the server
Backend processes logic
Database stores data

3 tier architecture divides the system into
Frontend user interface
Backend logic
Database storage

This is the foundation of almost every modern web application and is very important to understand before moving to advanced cloud topics.