0% found this document useful (0 votes)
3 views63 pages

Module 1

The document outlines the fundamentals of cloud architecture, including key service models (IaaS, PaaS, SaaS) and deployment models (public, private, hybrid, community). It discusses the significance of cloud computing in terms of cost reduction, scalability, high availability, and global accessibility, as well as various design patterns like horizontal scaling, auto-scaling, and database sharding for efficient resource management. Additionally, it covers considerations for consistency, failure, and performance in cloud environments.

Uploaded by

Vinay Adari
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views63 pages

Module 1

The document outlines the fundamentals of cloud architecture, including key service models (IaaS, PaaS, SaaS) and deployment models (public, private, hybrid, community). It discusses the significance of cloud computing in terms of cost reduction, scalability, high availability, and global accessibility, as well as various design patterns like horizontal scaling, auto-scaling, and database sharding for efficient resource management. Additionally, it covers considerations for consistency, failure, and performance in cloud environments.

Uploaded by

Vinay Adari
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Cloud

1
Architecture and
Essential Design
Patterns

Dr. Srividhya G
2
Agenda
• Fundamentals of Cloud Architecture
• The Significance of Cloud Computing
• Key Compute and Deployment Patterns
• Cloud Workflow and Data Patterns

• Consistency, Failure, and Performance Considerations


• Global Availability and Delivery Patterns
• Modern Cloud Applications
3

Fundamentals of Cloud
Architecture
Cloud Architecture:
4
Definition &
Components
Definition

Framework of front-end clients, back-end


servers/storage, delivery model, and Internet networking
enabling elastic, on-demand services.

• Includes front-end platform (client


devices, browsers).
• Back-end platform (servers, storage,
virtual machines).
• Cloud-based delivery model over the
internet.
• Enables on-demand self-service and
resource pooling.
Cloud Computing Reference Architecture
5
Cloud Computing Reference Architecture
6
Service
7 Models: IaaS, PaaS, and SaaS

IaaS (Infrastructure as a Service) PaaS (Platform as a Service) SaaS (Software as a Service)


Virtualized servers, storage, and networking. Managed OS, middleware, and runtimes. Fully managed apps via browser. No
Tenants manage OS and apps. Use cases: Developers focus on code. Use cases: rapid maintenance for users. Use cases: email,
CRM, collaboration tools.
scalable hosting, dev/test. dev, APIs, microservices.
8
Deployment Models: Public, Private, Hybrid, Community

Public Cloud Private Cloud


Maximizes cost efficiency and scalability; Provides exclusive resources for one
resources shared among organizations. Raises organization; ensures greater control and
security. Requires significant investment and
data privacy concerns and offers less control.
maintenance.

Hybrid Cloud Community Cloud


Combines public and private clouds; enables Shared by organizations with common concerns;
workload portability and optimized cost- supports compliance and mission objectives.
performance. Accelerating adoption for flexibility Balances cost and control within a trusted group.
and governance.
9

The Significance of Cloud


Computing
Cost Reduction
• No need to buy expensive hardware
• Pay-as-you-go pricing model
10 maintenance costs
• Reduces

Scalability & Elasticity


• Resources can be increased or decreased easily
• Supports business growth without infrastructure limits

High Availability
• Data backup and disaster recovery support
• Multiple data centers reduce downtime

Global Accessibility
• Access applications from anywhere via internet
• Supports remote work and collaboration

Faster Deployment
• Applications can be deployed quickly
• Reduces time-to-market
11

19.63%
Companies adopting cloud technologies achieve up to 19.63%
higher revenue growth
12
Cost Efficiency and Scalability

Pay-as-You-Go Pricing Dynamic Scaling


Transforms large upfront capital expenses into Resources can be scaled up or down instantly to
manageable operational costs, aligning spending meet real-time demand, ensuring optimal
with actual usage. performance and cost control.

Cost Reduction Market Responsiveness


Cloud adoption can lower infrastructure costs by Scalability enables organizations to quickly adapt
30-50%, minimizing waste and maximizing to market changes, supporting growth without
budget efficiency.
overprovisioning or delays.
Global
13 Accessibility and
Innovation Enablement

Worldwide Availability

Distributed data centers deliver access to apps and data


from anywhere with internet connectivity.

Collaboration & Speed

Real-time sharing and rapid prototyping accelerate innovation


across geographies.

Proven Impact

Forrester reports 85% of enterprises cite cloud as key to digital


transformation.
14

Key Compute and


Deployment Patterns
15
Definition 16
The Horizontally Scaling Compute Pattern is a cloud architecture design pattern where system
performance is increased by adding more servers (instances) instead of increasing the power of a
single server.

This is also called scale-out architecture

How It Works

•When traffic increases, new server instances are added.


•A load balancer distributes requests among all servers.
•If demand decreases, extra servers can be removed.

Key Features

•Adds multiple machines


•Uses load balancing
•Improves fault tolerance
•Supports high availability
Example
17
If a website hosted on Amazon Web Services receives heavy traffic during a sale, new virtual machines are
automatically added to handle the load.

Advantages

•Better scalability
•Reduced single point of failure
•Easy to expand
•Cost-effective in cloud environments

Horizontal vs Vertical Scaling


Horizontal Scaling Vertical Scaling
Add more servers Increase CPU/RAM of one server
More reliable Limited by hardware capacity
Suitable for distributed systems Suitable for small systems
18
Horizontally Scaling Compute Pattern

01
02
Normal Load
Baseline compute resources handle routine
workload.

Traffic Spike
System detects increased demand and
automatically adds more instances. 03
Scale Down
After spike subsides, excess instances are
decommissioned to optimize costs.
Auto-Scaling Pattern for Resource Management
19
The Auto-Scaling Pattern is a cloud design pattern where computing resources (servers, VMs, containers)
are automatically increased or decreased based on workload demand.

Why It Is Needed

• Handles sudden traffic spikes


• Prevents system overload
• Avoids paying for unused resources
• Improves user experience

• How It Works

1️⃣ System monitors metrics (CPU usage, memory, requests per second).
2️⃣ When usage crosses a threshold → new instances are added (scale out).
3️⃣ When demand drops → extra instances are removed (scale in).
Auto-Scaling Pattern for Resource Management
20

Monitoring Metrics Scaling Trigger


Continuously track workload metrics such as Predefined policies automatically trigger
CPU, memory, and network usage to detect scaling actions when thresholds are met.
demand fluctuations.

Resource Adjustment Cost Optimization


Compute resources are provisioned or Efficient resource allocation reduces
decommissioned in real-time to match costs by up to 40% while maintaining
demand. performance.
21

Cloud Workflow and Data


Patterns
Queue-Centric
22
Workflow Pattern for
Decoupling
Definition

The Queue-Centric Workflow Pattern is


a cloud architecture design pattern where
components communicate through a
message queue instead of directly
interacting with each other.

This helps in decoupling services,


meaning each component works
independently.
Queue-Centric
23
Workflow Pattern for
Decoupling
Why Decoupling is Important

• Reduces dependency between services


• Improves scalability
• Enhances fault tolerance
• Prevents system crashes due to one
component failure
Queue-Centric
24
Workflow Pattern for
Decoupling
How It Works

• A Producer sends a task/message to a


queue.
• The Message Queue temporarily stores
the message.
• A Consumer/Worker retrieves and
processes the message.
25
Queue-Centric
Workflow Pattern for
Decoupling
Decoupling & Resilience
Message queues separate producers from consumers to
isolate failures and keep services responsive.

Asynchronous Scaling
Producers and consumers scale independently,
enabling load leveling and efficient resource usage.

Eventual Consistency
Queues absorb bursts and allow delayed processing
while maintaining system integrity.

Industry Impact

Adopters report ~60% higher throughput and


reliability in distributed workflows.
MapReduce Pattern for Distributed Data Processing
The MapReduce pattern is a distributed computing model used to process very large datasets across
multiple machines in parallel.

It divides a big task into smaller sub-tasks (Map), processes them simultaneously, and then combines the
results (Reduce).

Uses:

• Handles Big Data efficiently


• Speeds up processing using parallel computing
• Works in distributed cloud environments
• Provides fault tolerance
MapReduce Architecture
27
28
MapReduce Pattern for Distributed Data Processing 29
01 02 03
Map Phase Shuffle & Sort Phase Reduce Phase
• Input data is split into smaller
chunks • Groups similar keys together Grouped values are
• Prepares data for aggregation aggregated or processed
• Each chunk is processed
independently to produce final results.
Example:
• Produces intermediate key–value
pairs Example:
(cloud,1), (cloud,1) → grouped
(cloud,2), (computing,1)
Example:

Input → “cloud computing cloud”

Output → (cloud,1), (computing,1),


(cloud,1)
MapReduce Pattern for Distributed Data Processing
Key Features
• Parallel processing
• Fault tolerant
• Efficient for structured & unstructured data

Advantages

•Faster data processing


•Handles structured and unstructured data
•Suitable for cloud environments

Conclusion
MapReduce is an efficient distributed data processing pattern that divides large datasets into smaller tasks (Map),
processes them in parallel, and combines the results (Reduce), making it highly suitable for Big Data applications.
DATABASE SHARDING PATTERN FOR SCALABILITY
31
In large-scale cloud applications, a single database server becomes a bottleneck as data and user requests
grow. To overcome this limitation, the Database Sharding Pattern is used to distribute data across
multiple database servers.

Database sharding is the process of splitting a large database into smaller, independent pieces called
shards, where each shard stores a subset of the total data.

Each shard:

•Has the same schema


•Stores different rows of data
•Operates independently
Why Sharding is Needed

32 •Handles large-scale data


•Reduces database load
•Improves query performance
•Eliminates single database bottleneck
•Supports horizontal scalability

Instead of storing all data in one database:

•Data is partitioned based on a shard key(e.g., User_ID, Region, Customer_ID)

Example:
•Shard 1 → Users 1–1,00,000
•Shard 2 → Users 1,00,001–2,00,000
•Shard 3 → Users 2,00,001–3,00,000
33
Database Sharding Pattern for Scalability

Advantages Challenges
Scalability, improved performance, and Complexity in key distribution, cross-
higher availability by distributing data shard queries, and maintaining
across multiple servers. consistency.

Implementation Scenarios Industry Impact


Best suited for high-traffic Case studies report up to 10x
applications, large datasets, and throughput increase and significant
systems with parallel query needs. latency reduction under heavy
workloads.
34

Consistency, Failure, and


Performance
Considerations
Eventual Consistency Primer
35it matters in distributed systems
Why

What is eventual consistency?


A model where updates propagate asynchronously across replicas, and all copies converge to the same value over time, without guaranteeing immediate
agreement after a write.

Why teams choose it


It favors availability and partition tolerance, keeping services responsive during network issues—well suited for globally distributed, highly available cloud
applications.

What research indicates


Studies show improved user-perceived latency and throughput in geo-distributed systems when using eventual consistency, especially under high write
rates and intermittent partitions.

Key implications and trade-offs


Applications must handle temporary read/write anomalies and define conflict resolution policies (e.g., CRDTs, version vectors, custom merge rules) to
ensure safe convergence.
NODE FAILURE PATTERN AND RESILIENCE STRATEGIES
36
• In distributed cloud environments, • Failures are normal in distributed
failures of individual nodes (servers, systems; therefore, systems must be
virtual machines, storage units) are designed to tolerate them.
common due to hardware faults,
network issues, or software errors. • Instead of preventing failure completely,
cloud systems are built to detect,
• The Node Failure Pattern is a cloud isolate, and recover from failures
design pattern that ensures system automatically.
availability and reliability even when one
or more nodes fail.
NODE FAILURE PATTERN AND RESILIENCE STRATEGIES
37
Key Techniques Used
Causes of Node Failure
a) Replication
• Multiple copies of data are stored on different nodes.
• Hardware crash If one node fails, another replica serves the request.

• Disk failure b) Failover Mechanism


• Power outage • Traffic is automatically redirected to healthy nodes.

• Network partition c) Heartbeat Monitoring


• Software bugs • Nodes send periodic signals.
If heartbeat stops, system marks node as failed.

d) Stateless Services
• Since no session data is stored locally, failed nodes can be easily replaced.

e) Auto-Recovery
• Cloud automatically launches a new node to replace the failed one.
38 Client Requests

• Client sends request to Load Balancer


Load Balancer
• Node 2 crashes
• Load Balancer stops routing traffic to Node 2
• Node 1 and Node 3 continue serving users
• New node is automatically created
Node 1 Node 2 Node 3

(Fails)

Node failures are unavoidable in large distributed systems. The Node Failure Pattern ensures system reliability by
using replication, monitoring, failover, and automatic recovery mechanisms, making cloud applications highly available
and fault tolerant.
39
Node Failure Pattern and Resilience Strategies

Redundancy Failover Mechanisms


Deploying duplicate resources ensures one Automated switching to backups on failure
node’s failure is covered instantly. Recovery time detection. Recovery is fast; setup and
is minimal; complexity rises with scale. maintenance need careful configuration.

Health Checks Self-Healing Orchestration


Continuous monitoring enables rapid detection Systems automatically replace or restart failed
and response. Recovery time varies with check nodes. Recovery time is low; complexity is high
frequency; complexity is moderate. due to orchestration logic.
WHAT IS NETWORK LATENCY?

• Network latency refers to the time it takes for data to travel from the source to the
destination across a network. It is typically measured in milliseconds (ms) and directly
impacts the performance, responsiveness, and user experience of applications, especially
in distributed and cloud computing environments.
• Latency becomes particularly critical in systems where real-time interactions, low
response times, and high throughput are essential.
WHAT IS NETWORK LATENCY?

• Latency is essentially a delay. When a user requests a webpage or a system sends data to
another server, latency is the time lag between initiating the request and receiving the
response. While high bandwidth ensures more data can be transferred per second, low
latency ensures the data gets there faster.
WHAT IS NETWORK LATENCY?

• Latency is composed of several components, including


Propagation delay: The time it takes for a signal to physically travel from source to
destination through a medium (fiber, copper, or wireless).
Transmission delay: Time to push all the packet's bits onto the link. Large files on slow
links take longer to start transmitting.
Processing delay: Time taken by routers and switches to process the packet header.
Queuing delay: Time spent waiting in line at routers or switches due to congestion.
WHAT IS NETWORK LATENCY?

Types of Latency
One-Way Latency
• This measures the time it takes for a packet to travel from source to destination in one
direction. It is important in applications like video conferencing where data flows
continuously and directionally.
Round-Trip Time (RTT)
• This measures the total time taken for a packet to go from source to destination and
back.
44

Global Availability and


Delivery Patterns
CDN Pattern for Content
Distribution

What is a CDN?
Globally distributed edge servers deliver
content closer to users to cut latency.
How it works
Static and dynamic assets are cached at
edges; requests route to the nearest node.
Keybenefits
Improved load times, higher reliability, and
up to 60% bandwidth cost reduction.
Why it matters
Essential for global cloud deployments and
stronger web performance at scale.
End Users (India, US,
Europe) User requests a file
46 01 (e.g., image/video).
DNS |
| (Geo-based routing) DNS routes to
02 nearest CDN edge.

CDN Edge CDN Edge


If cached → served
CDN Edge
server (IN) server (IN) server (IN) 03 immediately (Cache
Hit).
Cache Cache
hit Cache hit
If not cached →
hit
fetched from Origin
NO NO
04 → stored → delivered
Origin Server |
| (Main Web Server / | (Cache Miss).
| Cloud Storage)
Multisite Deployment Pattern for High Availability
47 The Multisite Deployment Pattern is a cloud architecture pattern where
an application is deployed across multiple geographically distributed
sites (data centers or cloud regions) to improve availability, disaster
recovery, and performance.

Multisite Deployment Users


Pattern refers to
deploying the same
application across two or Global Load Balancer |
more independent | (DNS / Traffic Mgr)

sites/regions, so that if
one site fails, others Site 1 (India) Site 2 (US)
Web Servers Web Servers
continue serving users.
App Servers App Servers
Database Replication Database
48
Deployment Models
Component Role
1. Active–Passive Global load Routes users to nearest/healthy site
•One site handles traffic. Balancer
•Second site acts as standby. Site 1 Primary data center
•Used mainly for Disaster Recovery (DR).
Lower cost Site 2 Secondary/backup site
Simpler management Database Keeps data synchronized
Replication
2. Active–Active Health Monitoring Detects failure and routes traffic
•Both sites serve traffic simultaneously.
•Traffic distributed between regions.
High availability
Better performance
No single point of failure
Real-World Example
49 Advantages
Example:

❖ High Availability
Amazon Web Services deploys applications in:
❖ Disaster Recovery
• Mumbai region
❖ Business Continuity
• Singapore region
❖ Reduced Latency (users connect to
nearest site) If Mumbai fails → traffic automatically shifts to
❖ Fault Tolerance Singapore.

• Similarly, companies like


Google and
Microsoft
run services across multiple global regions.
Multisite Deployment Pattern for High Availability
50
Cost
Multisite deployments require
significant investment in infrastructure
and ongoing operational expenses.
Balancing cost with the benefits of
Complexity
high availability is a key consideration.
Managing multiple data centers
increases architectural and operational
complexity, including configuration,
Latency monitoring, and synchronization.
Geographic separation can introduce
latency, impacting application
performance. Optimizing routing and
replication strategies is crucial.
Blades
51 vs. Stand-Alone
Servers in Cloud

Blade servers offer high-density,


modular, and energy-efficient
computing ideal for large-scale cloud
data centers, while standalone (rack)
servers provide individual, versatile,
and lower-initial-cost options for
smaller, general-purpose needs.
52
Blades vs. Stand-Alone
Servers in Cloud
Blade Servers in Cloud Infrastructure

•Definition: Thin, modular servers (blades)


housed in a central chassis.
•Pros: High density, shared
power/cooling/networking, simplified cabling,
hot-swappable.
•Cons: Higher initial cost for the chassis,
requires specialized management expertise.
•Use Case: Large-scale virtualization, high-
performance computing, data centers needing
to maximize space.
•Cloud Application: CSPs (Cloud Service
Providers) leverage blade servers for scalable,
efficient infrastructure
53
Blades vs. Stand-Alone
Servers in Cloud
Standalone (Rack) Servers in Cloud Infrastructure

•Definition: Self-contained, individual units


mounted in racks.
•Pros: Lower initial, per-unit cost, easier to
scale 1–10 units, greater flexibility for
specialized hardware.
•Cons: Higher cabling complexity, less density,
individual power/cooling per server.
•Use Case: General-purpose, small-to-medium
IT setups, applications requiring direct access
to unique components
54
Blades vs. Stand-Alone
Servers in Cloud
Key Differences

Feature Blade Standalone


Density High (High Low to Medium
compute/U)
Cooling/Power Shared Independent
(Efficient) (Less efficient)
Cabling Minimal (via High (Complex)
backplane)
Initial Cost High (due to Low
chassis)
Maintenance Easier at Scale More complex
55

Modern Cloud
Applications
Stateless Services
56 STATELESS APPLICATIONS
A stateless application does not store client-
specific session information on the server
between requests.
Each request from the client is independent.
Every request contains all the information needed
to process it.

After sending a response, the server forgets the


client.
Why Stateless Design is Important in Cloud?

Cloud systems require:


•Scalability
•Fault tolerance
•Elasticity
•Load balancing
Stateless Services
57 Stateless design makes all these easier.

Since no session is stored in server memory:

• Any server can handle any request.


• New servers can be added instantly.
• Failed servers can be removed without
affecting users.

How Stateless Applications Work

Step-by-Step Flow

[Link] sends request.


[Link] balancer forwards request to any available
server.
[Link] processes request.
[Link] sends response.
[Link] does not retain client information.
Stateless Services
Feature Stateless Stateful
58
Stores session
No Yes
on server
Easy to scale Yes Difficult
Failure impact Low High
Cloud friendly Very high Limited

Session Management in Stateless Systems

Since session is not stored in server memory, cloud


applications use:

• Cookies
• Token contains user info
• Centralized session store under shared database
Stateless Services
59 Advantages of Stateless Applications

Easy horizontal scaling

Compatible with auto-scaling


Better load balancing
High availability
Supports containerization
(Docker/Kubernetes)
Clustering in Cloud
60 Clustering is the process of connecting multiple servers (nodes) so that they work together as a single system.
In cloud computing, clustering ensures:

•High availability
•Load distribution
•Fault tolerance
•Scalability

Why Clustering is Important in Cloud


Cloud environments must handle:
•Millions of users
•Hardware failures
•Traffic spikes
•24/7 availability

Clustering helps achieve:


Continuous service
No single point of failure
Efficient resource utilization
61
Users

Load Balancer

Node 1 Node 1 Node 1

• Load balancer distributes traffic.


• All nodes work together.
• If one node fails, others continue.
Types of Clustering in Cloud 2. Load Balancing Cluster
• Purpose: Improve performance.
62 • Traffic divided among multiple servers.
1. High Availability (HA) Cluster • All nodes are active.
• Increases throughput and response speed.
Purpose: Prevent downtime. Used in:
•One node acts as active.
•Another acts as standby. • E-commerce websites
•If active fails → standby takes over • Streaming platforms
automatically.
3. Compute Cluster
Used in:
Purpose: Heavy processing.
•Banking systems
•Hospital systems
•Multiple servers perform parallel processing.
•Government portals
•Used for scientific computing, AI, big data.
CLOUD APPLICATIONS
Components of a Cloud Application Key Characteristics of Cloud Applications.
63
Frontend 1. Scalability
• Web interface or mobile app
• Ability to increase or decrease resources based on
• Runs in browser
demand.
Backend
• Application servers 2. Elasticity
• Business logic • Automatic scaling up during high traffic and scaling down
Database during low traffic.
• Stores data 3. High Availability
• Often replicated • Application remains available even if some servers fail.
Storage 4. Multi-Tenancy
• Object storage for files • Multiple users share the same infrastructure securely.
Networking 5. On-Demand Self-Service
• Load balancer
• Resources can be provisioned instantly.
• Firewall
6. Broad Network Access
• Accessible via browsers, mobile apps, APIs.

You might also like