PadhaikoAll subjects

Cloud Computing

Distributed and Cloud Computing (ENCT 411)

Open in the Padhaiko app

6.1 Cloud Computing: Definition, Essential Characteristics, and Reference Architecture

Definition

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)

  1. On-Demand Self-Service: Consumers unilaterally provision compute, storage, or databases automatically via web consoles or APIs without human operator approval.
  2. Broad Network Access: Capabilities are reachable over standard networks (Internet/VPN) from heterogeneous thin or thick clients (phones, laptops, IoT gateways).
  3. Resource Pooling (Multi-Tenancy): Provider resources are pooled across multiple tenants using virtualization and dynamic assignment, giving location independence.
  4. Rapid Elasticity: Capabilities scale outward and inward elastically—often automatically—so available capacity appears virtually unlimited to the tenant.
  5. 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:


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:

Cloud Service Models: Control, Abstraction, and Examples
ModelWhat the Provider ManagesWhat the Customer ManagesRepresentative Examples
IaaS (Infrastructure as a Service)Physical servers, storage, networking, hypervisorGuest OS, runtime, middleware, app code, dataAWS EC2, Azure VMs, Google Compute Engine
PaaS (Platform as a Service)Hardware + OS, patching, runtime, auto-scaling platformApplication code and application configuration/dataHeroku, Google App Engine, Azure App Service
SaaS (Software as a Service)Entire stack (hardware through application UI)User accounts, tenant settings, and user dataGmail, Microsoft 365, Salesforce, Zoom
FaaS (Function as a Service / Serverless)Servers, OS, runtime, event triggers, scale-to-zeroIndividual stateless event-handler functionsAWS Lambda, Google Cloud Functions, Azure Functions

6.2.2 Deployment Models: Public, Private, Community, and Hybrid

  1. 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.
  2. 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.
  3. Community Cloud: Infrastructure shared by several organizations with common regulatory, security, or mission requirements (e.g., government agencies, healthcare consortiums, universities).
  4. 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

Software-Defined Networking (SDN) and Software-Defined Storage (SDS)


6.4 Elasticity and Scalability: Load Balancing, Horizontal/Vertical Scaling, and Auto-Scaling

AspectVertical Scaling (Scale Up)Horizontal Scaling (Scale Out)
MechanismUpgrade CPU, RAM, or disk on a single VM/serverAdd or remove parallel server/container instances
Application ChangesMinimal (single-node code works unchanged)Requires stateless tiers (externalized sessions/DB)
Upper LimitHard physical ceiling (largest available machine)Virtually unlimited across racks/AZs
Availability During ScaleOften requires VM reboot/downtimeZero-downtime rolling additions and removals

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"):

Identity and Access Management (IAM), Encryption, and Compliance

  1. 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.
  2. 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.
  3. 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.

Standard Availability Tiers and Maximum Allowable Downtime
Availability SLAAllowed Downtime / YearAllowed Downtime / Month ()Allowed Downtime / Week
("two 9s")
("three 9s")
("four 9s")
("five 9s")

Pricing Models and Cloud Economics

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

Example 6.1

6.1

  1. A cloud provider guarantees a monthly availability SLA over a -day (-minute) billing month. What is the maximum allowed downtime in minutes?
  2. An application runs active-active across two independent Availability Zones, each having individual availability (). Calculate the composite compute availability .
  3. 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!

Answer:
  1. Max allowed downtime = .
  2. Active-active across 2 AZs yields ("six 9s").
  3. Three-stage serial path yields end-to-end availability.
Example 6.2

6.2

A startup runs a web backend for a -hour month:

  1. 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.
  2. 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!).
Answer:
  1. All On-Demand = ; Reserved + On-Demand = ( savings).
  2. Serverless FaaS bill = .
Example 6.3

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).

  1. Calculate the minimum number of instances needed at normal load () and at peak load () with the safety margin.
  2. 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.
Answer:
  1. Normal load requires instances; peak load requires instances (including headroom).
  2. 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

Question 1

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:

  1. 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.
Answer:

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.

Question 2

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.

Answer:

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.

Question 3
  1. Calculate the maximum permissible downtime (in minutes) during a -day month under a SLA.
  2. 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:

Answer:
  1. .
  2. ("nine 9s" theoretical compute availability).
Question 4

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.
Answer:

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.

Question 5

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.

Answer:

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).

← Distributed Storage and Data ProcessingVirtualization, Containers and Cloud-Native Systems →