Cloud Computing
Open in the Padhaiko app6.1 Cloud Computing: Definition, Essential Characteristics, and Reference Architecture
NIST Definition of Cloud Computing
According to NIST (SP 800-145), cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.
Five Essential Characteristics (NIST)
- On-Demand Self-Service: Consumers unilaterally provision compute, storage, or databases automatically via web consoles or APIs without human operator approval.
- Broad Network Access: Capabilities are reachable over standard networks (Internet/VPN) from heterogeneous thin or thick clients (phones, laptops, IoT gateways).
- Resource Pooling (Multi-Tenancy): Provider resources are pooled across multiple tenants using virtualization and dynamic assignment, giving location independence.
- Rapid Elasticity: Capabilities scale outward and inward elastically—often automatically—so available capacity appears virtually unlimited to the tenant.
- Measured Service: Metering systems track CPU-hours, GB-months, and egress bandwidth transparently for pay-as-you-go billing and chargeback.
NIST Cloud Reference Architecture
Defines five major actors:
- Cloud Consumer: Person or organization using cloud services and billed per SLA.
- Cloud Provider: Builds and operates physical infrastructure, abstraction/control layers, orchestration, security, and service management.
- Cloud Auditor: Independent third party assessing security controls, privacy, and compliance (SOC 2, ISO 27001).
- Cloud Broker: Intermediary offering service intermediation (identity/billing enhancements), aggregation (combining services), or arbitrage (selecting the cheapest/best provider dynamically).
- Cloud Carrier: Network connectivity provider linking consumers and providers (MPLS, Direct Connect, fiber ISPs).
6.2 Service Models and Deployment Models
6.2.1 Service Models: IaaS, PaaS, SaaS, and FaaS
Cloud models differ by where the boundary of management responsibility sits between customer and provider:
| Model | What the Provider Manages | What the Customer Manages | Representative Examples |
|---|---|---|---|
| IaaS (Infrastructure as a Service) | Physical servers, storage, networking, hypervisor | Guest OS, runtime, middleware, app code, data | AWS EC2, Azure VMs, Google Compute Engine |
| PaaS (Platform as a Service) | Hardware + OS, patching, runtime, auto-scaling platform | Application code and application configuration/data | Heroku, Google App Engine, Azure App Service |
| SaaS (Software as a Service) | Entire stack (hardware through application UI) | User accounts, tenant settings, and user data | Gmail, Microsoft 365, Salesforce, Zoom |
| FaaS (Function as a Service / Serverless) | Servers, OS, runtime, event triggers, scale-to-zero | Individual stateless event-handler functions | AWS Lambda, Google Cloud Functions, Azure Functions |
6.2.2 Deployment Models: Public, Private, Community, and Hybrid
- Public Cloud: Infrastructure owned and operated by a commercial provider (AWS, Azure, GCP) and shared across the general public via multi-tenancy. Maximum economies of scale and global reach; zero upfront CapEx.
- Private Cloud: Dedicated infrastructure operated exclusively for a single organization (on-premises or hosted). Maximum control over compliance, latency, and physical isolation, but higher CapEx and manual capacity planning.
- Community Cloud: Infrastructure shared by several organizations with common regulatory, security, or mission requirements (e.g., government agencies, healthcare consortiums, universities).
- Hybrid Cloud: Combines private (on-premises) and public clouds bound together by standardized networking and orchestration so sensitive data stays private while peak workloads cloud-burst onto public infrastructure.
6.3 Cloud Data Center Architecture: Regions, Availability Zones, SDN, and SDS
Global Hierarchy: Regions and Availability Zones
- Region: A distinct geographic area (e.g.,
ap-south-1Mumbai,us-east-1N. Virginia) chosen for low user latency and data residency compliance. Regions are isolated from each other so disasters remain localized. - Availability Zone (AZ): One or more discrete data centers within a region, separated by miles on independent power grids, cooling, and flood plains, yet linked by ultra-low-latency () redundant fiber for synchronous replication.
- Edge Locations (PoPs): Smaller global caching/CDN endpoints bringing static assets and DNS close to end users.
Software-Defined Networking (SDN) and Software-Defined Storage (SDS)
- Software-Defined Networking (SDN): Decouples the control plane (centralized SDN controller computing routing/firewall rules in software) from the data plane (programmable switches/virtual switches forwarding packets via OpenFlow or VXLAN overlays). Enables isolated multi-tenant Virtual Private Clouds (VPCs), elastic load balancers, and zero-touch network provisioning.
- Software-Defined Storage (SDS): Abstracts heterogeneous commodity disks behind a software control plane (e.g., Ceph, AWS EBS/S3), automating replication, erasure coding, thin provisioning, and snapshots independently of proprietary SAN hardware.
6.4 Elasticity and Scalability: Load Balancing, Horizontal/Vertical Scaling, and Auto-Scaling
| Aspect | Vertical Scaling (Scale Up) | Horizontal Scaling (Scale Out) |
|---|---|---|
| Mechanism | Upgrade CPU, RAM, or disk on a single VM/server | Add or remove parallel server/container instances |
| Application Changes | Minimal (single-node code works unchanged) | Requires stateless tiers (externalized sessions/DB) |
| Upper Limit | Hard physical ceiling (largest available machine) | Virtually unlimited across racks/AZs |
| Availability During Scale | Often requires VM reboot/downtime | Zero-downtime rolling additions and removals |
- Load Balancing: Distributes incoming requests across healthy backend instances via L4 (TCP/UDP) or L7 (HTTP path/header routing) algorithms—Round Robin, Least Connections, Weighted, or IP Hash—performing periodic health checks to drain failed nodes.
- Auto-Scaling: Dynamically adjusts replica count using reactive policies (target tracking on CPU , request queue depth, or p95 latency with cooldown periods to prevent oscillation/thrashing) or predictive/scheduled policies (pre-warming capacity before known traffic spikes).
6.5 Cloud Security and Governance: Shared Responsibility, IAM, Encryption, and Compliance
The Shared Responsibility Model
Security in the cloud is split between the Cloud Provider ("Security OF the Cloud") and the Customer ("Security IN the Cloud"):
- Provider Responsibilities (All Models): Physical security of data centers, hardware lifecycle, network perimeter, hypervisor isolation.
- Customer Responsibilities (Varies by Model):
- IaaS: Guest OS patching, host firewalls, IAM roles, application security, data encryption.
- PaaS: Application code, API security, IAM permissions, data classification.
- SaaS: User access management, MFA, data governance, endpoint hygiene.
Identity and Access Management (IAM), Encryption, and Compliance
- IAM: Enforces Authentication (who you are—users, roles, federated SSO, MFA) and Authorization (what you can do—policy JSON statements), following the Principle of Least Privilege and short-lived temporary credentials instead of static root keys.
- Data Encryption:
- In Transit: TLS 1.3 / mTLS protecting traffic between clients, load balancers, and internal services.
- At Rest: AES-256 encryption for volumes, object buckets, and databases managed via a KMS (Key Management Service) with envelope encryption and key rotation.
- Governance and Compliance: Audit trails (CloudTrail), policy guardrails, and regulatory certifications (GDPR data privacy, HIPAA healthcare, PCI-DSS payment cards, ISO 27001 / SOC 2).
6.6 Service Level Agreements (SLA), Pricing Models, Cloud Economics, and Vendor Lock-In
Service Level Agreements (SLAs)
An SLA is a formal contract defining measurable Service Level Objectives (SLOs)—uptime percentage (e.g., or ), maximum latency, durability—alongside monitoring rules and service credits refunded if the provider breaches the guarantee.
| Availability SLA | Allowed Downtime / Year | Allowed Downtime / Month () | Allowed Downtime / Week |
|---|---|---|---|
| ("two 9s") | |||
| ("three 9s") | |||
| ("four 9s") | |||
| ("five 9s") |
Pricing Models and Cloud Economics
- CapEx vs. OpEx: Cloud shifts upfront Capital Expenditure (CapEx) for physical servers into variable Operational Expenditure (OpEx) billed monthly by consumption.
- Compute Pricing Tiers:
- On-Demand: Pay per second/hour with zero commitment; highest unit rate, ideal for unpredictable spikes.
- Reserved Instances / Savings Plans: -year or -year commitment yielding discount for steady baseline capacity.
- Spot / Preemptible Instances: Bid on spare capacity at discount; provider can reclaim with warning (ideal for stateless batch/ML).
- Serverless (FaaS): Billed strictly per invocation count and GB-seconds of execution ( idle cost).
Vendor Lock-In and Mitigation
Vendor lock-in occurs when switching cloud providers becomes prohibitively costly due to proprietary APIs (e.g., DynamoDB, Lambda triggers), custom IAM/tooling, and high data egress fees. Mitigation strategies include using open standards (Kubernetes, Terraform, PostgreSQL/S3-compatible APIs), containerizing workloads, and maintaining portable infrastructure-as-code.
Worked Out Examples
6.1
- A cloud provider guarantees a monthly availability SLA over a -day (-minute) billing month. What is the maximum allowed downtime in minutes?
- An application runs active-active across two independent Availability Zones, each having individual availability (). Calculate the composite compute availability .
- Suppose the full request path depends sequentially (in series) on a DNS/Load Balancer (), an App Tier (), and a Database (). Compute the overall end-to-end availability .
1. Maximum Monthly Downtime at :
2. Parallel Redundant Availability (Two Independent AZs):
3. End-to-End Series Availability:
Notice that adding serial dependencies reduces overall availability below even the weakest single component!
- Max allowed downtime = .
- Active-active across 2 AZs yields ("six 9s").
- Three-stage serial path yields end-to-end availability.
6.2
A startup runs a web backend for a -hour month:
- VM Strategy: Baseline load requires VMs continuously (), plus an additional VMs during the entire month. Compare the monthly cost of running all VMs On-Demand () versus putting the baseline VMs on a -year Reserved Plan () and keeping On-Demand.
- Serverless (FaaS) Comparison: A background image-thumbnail worker triggers times/month, using () RAM for () per invocation. Compute the monthly FaaS bill at per requests and per (ignoring free tier).
1. VM Monthly Cost Comparison:
- All On-Demand ( VMs ):
- Hybrid Reserved + On-Demand ( Reserved + On-Demand):
- Savings: ( saved).
2. Serverless (FaaS) Monthly Cost:
- Request charges: .
- Compute ():
- Total FaaS cost: (far cheaper than keeping even one idle VM online!).
- All On-Demand = ; Reserved + On-Demand = ( savings).
- Serverless FaaS bill = .
6.3
Auto-Scaling Capacity Planning: An e-learning portal averages during normal hours and spikes to during evening exams. Each application instance safely handles at target CPU utilization, and the platform team adds extra safety headroom (multiplying required count by and rounding up to the next integer).
- Calculate the minimum number of instances needed at normal load () and at peak load () with the safety margin.
- Explain how Load Balancing, Cooldown Periods, and Shared Responsibility apply to this deployment.
1. Instance Sizing Calculations:
- Normal load (): Base instances instances. With safety headroom: instances.
- Peak exam load (): Base instances instances. With safety headroom: instances.
2. Operational Controls:
- L7 Load Balancer: Distributes HTTPS requests across the stateless instances using Least Connections and health checks, terminating TLS at the edge.
- Cooldown Period: Prevents auto-scaling thrashing (rapidly adding and terminating VMs on brief metric dips) by waiting e.g. minutes after a scale-out before scaling in.
- Shared Responsibility (IaaS/PaaS): Provider secures physical racks, hypervisors, and network fabric; the university team secures IAM policies, TLS certificates, database encryption, and OS/app patches.
- Normal load requires instances; peak load requires instances (including headroom).
- Combine an L7 load balancer, auto-scaling cooldown periods to prevent thrashing, and IAM + TLS/KMS encryption under Shared Responsibility.
Exercises
Practice Exercises — Cloud Computing
State the five essential characteristics of cloud computing defined by NIST, and compare IaaS, PaaS, SaaS, and FaaS in terms of customer vs. provider control.
Five NIST Characteristics:
- On-demand self-service, 2. Broad network access, 3. Resource pooling (multi-tenancy), 4. Rapid elasticity, 5. Measured service.
Service Model Boundary:
- IaaS: Provider manages hardware + virtualization; customer manages OS, runtime, app, and data.
- PaaS: Provider manages hardware through runtime/scaling; customer manages app code and data.
- SaaS: Provider manages entire stack; customer manages users and data.
- FaaS: Provider manages servers, scaling, and event runtime (scale-to-zero); customer writes stateless functions.
NIST defines cloud by self-service, broad network access, resource pooling, rapid elasticity, and measured service. Moving from IaaS PaaS FaaS SaaS progressively shifts OS, runtime, and application management from the customer to the provider.
Differentiate between Public, Private, Community, and Hybrid cloud deployment models, and explain the relationship between Cloud Regions, Availability Zones, SDN, and SDS.
Four Deployment Models:
- Public: Shared multi-tenant provider infrastructure (low CapEx, elastic scale).
- Private: Single-tenant dedicated infrastructure (maximum compliance/control).
- Community: Shared by organizations with common regulations/missions.
- Hybrid: Integrates private and public clouds for data residency plus cloud-bursting.
Cloud Data Center Architecture: A Region is an isolated geographic zone containing multiple Availability Zones (physically separated facilities with independent power/cooling linked by fiber). SDN virtualizes multi-tenant VPCs/routing by separating control and data planes, while SDS abstracts commodity disks into elastic, replicated block/object pools.
Public, Private, Community, and Hybrid clouds trade off cost, control, and compliance. Cloud infrastructure groups Availability Zones inside Regions and relies on SDN and SDS to provision isolated networks and storage programmatically.
- Calculate the maximum permissible downtime (in minutes) during a -day month under a SLA.
- If an API cluster runs active-active across independent Availability Zones each having availability, calculate the composite cluster availability.
1. Maximum Monthly Downtime ():
2. Three-AZ Parallel Availability:
- .
- ("nine 9s" theoretical compute availability).
Explain the Shared Responsibility Model across IaaS, PaaS, and SaaS, and describe how IAM (least privilege) and encryption in transit and at rest enforce cloud security.
Shared Responsibility: The cloud provider always secures physical datacenters, hardware, and virtualization ("security of the cloud"), while the customer secures data, identities, and—for IaaS—the guest OS and network firewall rules ("security in the cloud").
IAM and Encryption Controls:
- IAM: Uses MFA, role-based temporary credentials, and least-privilege policies so compromised services cannot access unrelated buckets or databases.
- Encryption: TLS 1.3/mTLS protects data in transit; AES-256 backed by KMS envelope keys protects disks, snapshots, and object buckets at rest.
Providers secure physical infrastructure while customers secure configurations, identities, and data (with OS/network duties shifting across IaaS PaaS SaaS), enforced via least-privilege IAM and TLS + KMS AES-256 encryption.
Compare On-Demand, Reserved, and Spot cloud pricing models, and explain two strategies to mitigate vendor lock-in. Additionally, calculate the monthly cloud storage + egress bill for an application storing at with of internet egress at .
Pricing Models and Vendor Lock-In Mitigation:
- Pricing: On-Demand gives full flexibility at standard rates; Reserved discounts for year commitments; Spot offers up to off spare capacity with preemption risk.
- Mitigating Lock-In: Standardize on portable open abstractions (Kubernetes, Terraform, S3-compatible APIs, PostgreSQL) and containerize workloads to avoid proprietary PaaS glue.
Monthly Storage + Egress Cost:
Notice that of the bill comes from egress fees, which is itself a major economic driver of cloud lock-in.
On-Demand/Reserved/Spot balance flexibility against deep commitment or preemption discounts; mitigate vendor lock-in with containers, Kubernetes, and Terraform. Monthly bill = ( storage + egress).