Skip to content

Cloud Architecture

Cloud computing has fundamentally changed how software is built, deployed, and operated. Instead of purchasing and managing physical hardware, teams provision virtual resources on demand, paying only for what they use. This shift enables organizations of all sizes to build systems that scale globally, tolerate failures gracefully, and evolve rapidly.


What Is Cloud Computing?

The National Institute of Standards and Technology (NIST) defines cloud computing through five essential characteristics:

┌─────────────────────────────────────────────────────────────┐
│ Five Essential Characteristics │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. On-demand self-service │
│ Provision resources without human interaction │
│ │
│ 2. Broad network access │
│ Available over the network via standard mechanisms │
│ │
│ 3. Resource pooling │
│ Provider's resources serve multiple consumers │
│ (multi-tenancy) │
│ │
│ 4. Rapid elasticity │
│ Scale up and down quickly, often automatically │
│ │
│ 5. Measured service │
│ Resource usage is monitored, controlled, and billed │
│ │
└─────────────────────────────────────────────────────────────┘

Before Cloud vs After Cloud

AspectTraditional (On-Premise)Cloud
ProvisioningWeeks to months (hardware procurement)Minutes (API call)
Capital expenseLarge upfront investmentNo upfront cost (pay-as-you-go)
ScalingManual; buy more hardwareAutomatic; add instances on demand
UtilizationOften 10-20% averageOptimized through elasticity
Global reachRequires building/leasing data centersDeploy to any region instantly
MaintenanceIn-house team manages everythingProvider manages infrastructure
Disaster recoveryExpensive secondary data centerBuilt-in multi-region options

Why Cloud Computing Matters

1. Elasticity

Scale resources up during peak demand and down during quiet periods. Pay only for what you actually use.

Traffic Pattern:
▲ Capacity
Wasted ──┤ ┌────────────────────────── On-premise capacity
capacity │ │ ████ (fixed, overprovisioned)
│ │ ████ ██
│ │ ████ ████
│ │ ████ ████ ██
├─┤─████──████──████──────── Avg traffic
│ │ ████ ████ ████ ██
│ │ ████ ████ ████ ████
└─┴─────────────────────────▶ Time
Cloud auto-scaling:
▲ Capacity
│ ┌──┐
│ │ │ ┌──┐ Cloud capacity
│ ┌─┤ ├──┤ │ (matches demand)
│ │ │ │ │ │ ┌──┐
├─┤ │ │ │ ├──┤ │
│ │ │ │ │ │ │ │ ┌──┐
│ │ │ │ │ │ │ │ │ │
└─┴─┴──┴──┴──┴──┴──┴──┴──┴─▶ Time

2. Pay-As-You-Go Economics

Traditional infrastructure requires guessing future capacity. Cloud computing transforms capital expenditure (CapEx) into operational expenditure (OpEx).

3. Global Distribution

Deploy your application to data centers around the world in minutes:

┌─────────────────────────────────────────────────────┐
│ Global Cloud Regions │
│ │
│ North America Europe Asia Pacific │
│ ───────────── ────── ──────────── │
│ US East (VA) Ireland Tokyo │
│ US West (OR) Frankfurt Singapore │
│ Canada London Sydney │
│ US East (OH) Paris Mumbai │
│ US West (CA) Stockholm Seoul │
│ Milan Hong Kong │
│ │
│ South America Middle East Africa │
│ ───────────── ─────────── ────── │
│ Sao Paulo Bahrain Cape Town │
│ UAE │
└─────────────────────────────────────────────────────┘

4. Managed Services

Cloud providers offer hundreds of managed services that eliminate operational burden:

CategoryExamples
ComputeVirtual machines, containers, serverless functions
StorageObject storage, block storage, file systems
DatabasesRelational, NoSQL, in-memory, graph
NetworkingLoad balancers, CDN, DNS, VPN
AI/MLTraining platforms, pre-built models, inference
AnalyticsData warehouses, streaming analytics, BI tools
SecurityIdentity management, encryption, compliance tools

Major Cloud Providers

The Big Three

┌──────────────────────────────────────────────────────────┐
│ Market Share (IaaS) │
├──────────┬───────────┬───────────┬───────────────────────┤
│ AWS │ Azure │ GCP │ Others │
│ ~31% │ ~25% │ ~11% │ ~33% │
│ │ │ │ (Alibaba, Oracle, │
│ │ │ │ IBM, etc.) │
└──────────┴───────────┴───────────┴───────────────────────┘
FeatureAWSAzureGCP
Launched200620102008
StrengthsBroadest service catalog; largest ecosystemEnterprise integration; hybrid cloudData/ML/analytics; Kubernetes (GKE)
ComputeEC2, Lambda, ECS/EKSVMs, Functions, AKSCompute Engine, Cloud Run, GKE
StorageS3, EBS, EFSBlob Storage, Disk, FilesCloud Storage, Persistent Disk
DatabaseRDS, DynamoDB, AuroraSQL DB, Cosmos DBCloud SQL, Spanner, Bigtable
ServerlessLambdaAzure FunctionsCloud Functions
Container orchestrationEKS, ECSAKSGKE (strongest K8s offering)
Global regions30+60+35+
Best forStartups, broad workloadsMicrosoft shops, enterpriseData-heavy, ML workloads

Cloud-Native Principles

Cloud-native applications are designed from the ground up to exploit the advantages of cloud computing. The Cloud Native Computing Foundation (CNCF) defines cloud-native technologies as those that “empower organizations to build and run scalable applications in modern, dynamic environments.”

The Twelve-Factor App

The Twelve-Factor methodology (by Heroku co-founder Adam Wiggins) defines best practices for building cloud-native applications:

┌────┬─────────────────────────┬─────────────────────────────────┐
│ # │ Factor │ Principle │
├────┼─────────────────────────┼─────────────────────────────────┤
│ 1 │ Codebase │ One codebase per app, many │
│ │ │ deploys │
│ 2 │ Dependencies │ Explicitly declare and isolate │
│ 3 │ Config │ Store config in environment │
│ │ │ variables │
│ 4 │ Backing Services │ Treat as attached resources │
│ 5 │ Build, Release, Run │ Strictly separate stages │
│ 6 │ Processes │ Execute as stateless processes │
│ 7 │ Port Binding │ Export services via port binding│
│ 8 │ Concurrency │ Scale out via the process model │
│ 9 │ Disposability │ Fast startup and graceful │
│ │ │ shutdown │
│ 10 │ Dev/Prod Parity │ Keep environments similar │
│ 11 │ Logs │ Treat logs as event streams │
│ 12 │ Admin Processes │ Run admin tasks as one-off │
│ │ │ processes │
└────┴─────────────────────────┴─────────────────────────────────┘

Key Cloud-Native Concepts

Microservices: Decompose applications into small, independently deployable services.

Containers: Package applications with their dependencies for consistent deployment across environments.

Orchestration: Use Kubernetes or similar platforms to manage containerized workloads at scale.

Service Mesh: Handle service-to-service communication, security, and observability transparently.

Infrastructure as Code (IaC): Define infrastructure using code (Terraform, CloudFormation, Pulumi) for version control and reproducibility.

CI/CD: Automate build, test, and deployment pipelines for rapid, reliable releases.

Cloud-Native Application Stack:
┌─────────────────────────────────────┐
│ Application Code │
│ (Microservices, 12-Factor) │
├─────────────────────────────────────┤
│ Container Runtime (Docker) │
├─────────────────────────────────────┤
│ Orchestration (Kubernetes) │
├─────────────────────────────────────┤
│ Service Mesh (Istio/Linkerd) │
├─────────────────────────────────────┤
│ Cloud Infrastructure │
│ (Compute, Storage, Networking) │
├─────────────────────────────────────┤
│ IaC (Terraform/CloudFormation) │
└─────────────────────────────────────┘

Well-Architected Framework

All three major cloud providers publish a well-architected framework. The AWS version defines six pillars that represent the key design principles for cloud-based systems:

The Six Pillars

Well-Architected Framework
┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
│Operational│ Security │Reliability│ Perf. │ Cost │ Sustain- │
│Excellence │ │ │Efficiency│ Optim. │ ability │
├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
│ Automate │ Least │ Auto │ Right- │ Pay for │ Minimize │
│ operations│privilege │ recovery │ size │ what you │ environ. │
│ IaC │ Encrypt │ Scale │ Caching │ use │ impact │
│ Observe │ Audit │ Test │ Async │ Optimize │ Efficient│
│ │ Layers │ failures │ Global │ Reserved │ resources│
└──────────┴──────────┴──────────┴──────────┴──────────┴──────────┘

1. Operational Excellence: Automate operations, use infrastructure as code, make frequent small changes, anticipate failure, and learn from operational events.

2. Security: Implement strong identity controls, enable traceability, apply security at all layers, automate security best practices, protect data in transit and at rest.

3. Reliability: Automatically recover from failure, test recovery procedures, scale horizontally, stop guessing capacity, manage change through automation.

4. Performance Efficiency: Use the right resource types and sizes, make data-driven decisions about architecture, use managed services, and experiment frequently.

5. Cost Optimization: Adopt a consumption model, measure overall efficiency, stop spending money on undifferentiated heavy lifting, analyze and attribute expenditure.

6. Sustainability: Understand the environmental impact of your workloads, establish sustainability goals, maximize utilization, use efficient hardware and software.


Cloud Architecture Example

Here is a typical cloud-native web application architecture:

┌─────────────────────────────────────────────────────────────────────┐
│ Cloud Architecture │
│ │
│ Users ──▶ CloudFront (CDN) ──▶ Route 53 (DNS) │
│ │ │
│ ▼ │
│ Application Load Balancer │
│ │ │
│ ┌──────┴──────┐ │
│ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ Auto Scaling Group │
│ │ ECS │ │ ECS │ (containers or EC2) │
│ │ Task 1 │ │ Task 2 │ │
│ └────┬────┘ └────┬────┘ │
│ │ │ │
│ ┌────▼────────────▼────┐ │
│ │ VPC (Private) │ │
│ │ │ │
│ │ ┌─────────┐ ┌──────┐│ │
│ │ │ RDS │ │Redis ││ │
│ │ │(Primary)│ │Cache ││ │
│ │ └────┬────┘ └──────┘│ │
│ │ │ │ │
│ │ ┌────▼────┐ │ │
│ │ │ RDS │ │ │
│ │ │(Replica)│ │ │
│ │ └─────────┘ │ │
│ └───────────────────────┘ │
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ S3 │ │ SQS/SNS │ │CloudWatch │ │
│ │(Objects) │ │(Messaging)│ │(Monitoring)│ │
│ └───────────┘ └───────────┘ └───────────┘ │
└─────────────────────────────────────────────────────────────────────┘

Cloud Deployment Models

ModelDescriptionUse Case
Public CloudResources shared among multiple tenants on provider infrastructureStartups, web apps, variable workloads
Private CloudDedicated infrastructure for a single organizationRegulated industries, sensitive data
Hybrid CloudCombination of public and private clouds with workload portabilityGradual migration, burst capacity
Multi-CloudUsing services from multiple cloud providersAvoid vendor lock-in, best-of-breed

Getting Started with Cloud

Terminal window
# Install AWS CLI
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
# Configure credentials
aws configure
# Launch an EC2 instance
aws ec2 run-instances \
--image-id ami-0abcdef1234567890 \
--instance-type t3.micro \
--key-name my-key-pair \
--security-group-ids sg-12345678 \
--subnet-id subnet-12345678
# Create an S3 bucket
aws s3 mb s3://my-application-bucket
# Deploy a Lambda function
aws lambda create-function \
--function-name my-function \
--runtime python3.12 \
--handler lambda_function.handler \
--zip-file fileb://function.zip \
--role arn:aws:iam::123456789012:role/lambda-role

Topics in This Section

Cloud Service Models

Understand IaaS, PaaS, SaaS, FaaS, and the shared responsibility model for each tier.

Explore Service Models

Serverless Architecture

Build event-driven applications with serverless functions, understand cold starts, and learn when serverless is the right choice.

Explore Serverless

Cloud Design Patterns

Master essential patterns: circuit breaker, retry, bulkhead, sidecar, strangler fig, and CQRS in cloud environments.

Explore Patterns

Cost Optimization

Learn FinOps principles, right-sizing strategies, reserved instance planning, and cost monitoring approaches.

Explore Cost Optimization


  • Distributed Systems — Cloud applications are inherently distributed
  • DevOps — CI/CD, infrastructure as code, and operational practices
  • System Design — Architect systems that leverage cloud services effectively
  • Security — Securing cloud infrastructure and applications
  • Caching & Performance — Optimize cloud application performance