CloudVol. 7 · Part VII
0 / 0

Shelves / Cloud

CL·85

Cloud Fundamentals

What the cloud actually is and how it's built: the NIST characteristics, IaaS/PaaS/SaaS/FaaS, the shared responsibility model, the physical hierarchy of regions, availability zones, fault domains and edge locations, the core primitives (compute, storage, network, identity, managed services), control planes versus data planes, and the properties you design for: elasticity, scalability, availability (and the arithmetic of nines), durability, and multi-tenancy, plus quotas, pricing models, region selection and sovereignty.

28 topics · ~20 min read · 30-question quiz
Updated Suggest a correction

Start here: the numbers the cloud promises

Availability is a percentage of time

A cloud provider promises (in a service-level agreement, SLA) that a service will be available for a percentage of each month, and pays a service credit if it isn't. Turn those percentages into minutes and they become concrete:

Text
1) published monthly SLAs turned into allowed downtime per month:
   one EC2 instance (instance-level SLA)       99.50%  →  219.0 minutes
   EC2 across ≥2 AZs (region-level SLA)        99.99%  →    4.4 minutes
   RDS Single-AZ                               99.50%  →  219.0 minutes
   RDS Multi-AZ                                99.95%  →   21.9 minutes
   S3 Standard                                 99.90%  →   43.8 minutes

The most important line is the difference between the first two: a single virtual machine is promised 99.5% (over three and a half hours of downtime a month), while EC2 deployed across two or more availability zones is promised 99.99% (under 5 minutes). The cloud's reliability isn't something you get by being in the cloud; you get it by using several zones. An SLA is also only a refund policy: a 10% credit on the instance's bill doesn't compensate for a lost day of orders.

Composing availability

A request usually needs several components in a row: load balancer, application, database. If any one is down, the request fails, so serial availabilities multiply. Redundant copies, where either can serve, combine the other way: the system is down only if all copies are down.

Text
2) composing them (assuming failures are independent):
   load balancer × 1 instance × Multi-AZ DB:          99.440%  (245 min/month)
   2 instances in different AZs (either can serve):    99.9975%
   load balancer × 2 instances × Multi-AZ DB:          99.938%  (27 min/month)

One instance dragged the whole chain down to its own 99.5%. Two instances in two zones made the application tier nearly perfect, and the chain's weakest link became the database. Two rules fall out of the arithmetic:

  • Serial: A_total = A₁ × A₂ × … (always lower than the weakest part).
  • Parallel: A_total = 1 − (1 − A)ⁿ (much higher than any one copy, if failures are independent).

That "if" carries a lot of weight. Copies that share a cause of failure (the same bad deploy, configuration push, region-wide control-plane problem or expired certificate) fail together, and the parallel formula then overstates availability badly (the lab simulates it).

The other promises

Property Meaning Typical figure
Availability Fraction of time the service answers successfully 99.9–99.99% for regional services
Durability Probability data you stored isn't lost S3 is designed for 99.999999999% (11 nines) a year
Elasticity How quickly capacity follows demand Instances in about a minute, functions in milliseconds to seconds
Latency Time for a request, bounded below by distance ~1 ms within a region between zones; tens to hundreds across continents

Durability and availability are different: S3 Standard is designed to almost never lose an object, but an SLA of 99.9% means you may briefly be unable to read it. And no durability figure protects you from your own DELETE: that's what versioning, object lock and backups are for.

How deep to go in cloud fundamentals

Volume 17 defines six mastery levels. For this chapter they look like this; the chapter aims at L3 everywhere, and its lab at L4.

Level What you can do
L1 Explain regions, zones, edge locations, the core primitives and shared responsibility
L2 Choose regions and zones, read SLAs and pricing pages, set budgets and quotas
L3 Compute composite availability, durability and latency floors; explain fault domains
L4 Diagnose designs whose redundancy shares failure causes; explain bills and quota limits
L5 Design for zone and region failure, data residency and cost from the start
L6 Set cloud strategy: landing zones, account structure, commitments and governance

What "cloud" means

Definition

The US NIST definition (SP 800-145) is still the cleanest. Cloud computing is a model for on-demand network access to a shared pool of configurable computing resources, with five essential characteristics:

Characteristic Meaning What it changes for engineers
On-demand self-service Provision resources yourself through an API or console, no ticket to a human Infrastructure becomes code; environments in minutes
Broad network access Reachable over standard networks from anywhere Everything is remote; security moves to identity and network policy
Resource pooling Provider's hardware is shared among many tenants (multi-tenancy) Isolation and noisy neighbours matter
Rapid elasticity Scale out and in quickly, often automatically Design for horizontal scaling; capacity planning becomes cost planning
Measured service Pay for what you use, metered per second, request, GB Architecture decisions are cost decisions

The three dominant hyperscalers are AWS (2006, the largest), Microsoft Azure and Google Cloud, followed by Oracle Cloud (OCI), Alibaba Cloud, IBM Cloud, and many specialised providers (Cloudflare, DigitalOcean, Hetzner, Akamai/Linode, GPU clouds such as CoreWeave).

Service models

on-premIaaSPaaS / CaaSFaaSSaaS data/IAMapp coderuntimeOSvirt.hardware you youprovider youprovider youprovider youprovider green = your responsibility · grey = provider's
Who manages what in each service model. Moving right, the provider takes over more of the stack; you keep responsibility for your data, identities and access configuration in every model.
Model You get You manage Examples
IaaS Virtual machines, disks, networks OS, patching, runtime, scaling, app EC2, Azure VMs, Compute Engine
CaaS (containers) A place to run containers or Kubernetes Images, deployments, (sometimes nodes) ECS, EKS, AKS, GKE, Fargate
PaaS A platform that runs your code or container Code, config Cloud Run, Azure App Service, Container Apps, Elastic Beanstalk, Heroku
FaaS (serverless functions) Run a function per event; scale to zero Function code, triggers Lambda, Azure Functions, Cloud Run functions
SaaS A finished application Users, data, settings Microsoft 365, Salesforce, GitHub
Managed services Databases, queues, caches, search, ML operated for you Schema, data, access, sizing RDS, DynamoDB, Cosmos DB, Cloud SQL, SQS, Pub/Sub

The shared responsibility model

Every provider publishes a shared responsibility model: the provider secures the cloud ("security of the cloud": data centres, hardware, hypervisor, network backbone, the managed service's internals); you secure what you put in it ("security in the cloud": identities and permissions, network exposure, OS and application patches on IaaS, data classification and encryption choices, configuration).

The line moves with the service model, but some things are always yours:

  • who has access (IAM),
  • what's exposed to the internet,
  • your data and its backups,
  • your configuration.

Most cloud breaches come from the customer side: public storage buckets, leaked access keys, over-permissive roles, unpatched VMs, and open management ports.

The physical hierarchy

Regions, zones and fault domains

region: ap-south-1 (Mumbai) AZ a data centreracks = faultdomains data centre AZ b data centre(s) AZ c data centre(s) AZs: separate power, cooling, network · ~1–2 ms apart edge locationsCDN · DNS · WAF other regioneu-west-1 · 100+ ms
The physical hierarchy of a cloud. A region is a geographic area containing several availability zones; each zone is one or more data centres with independent power, cooling and networking, connected to the others by low-latency links. Inside a data centre, racks and hosts form smaller fault domains. Edge locations sit closer to users.
Level What it is Typical latency between peers Fails together when…
Host One physical server — Hardware fault, host maintenance
Rack / fault domain Servers sharing a top-of-rack switch and power distribution < 0.1 ms ToR switch or PDU failure
Data centre A building < 0.5 ms Building power or cooling, fire
Availability zone One or more data centres with independent power, cooling and networking, physically separated (kilometres apart) but connected by low-latency fibre ~1–2 ms Zone-wide power/network events, bad zonal deploys
Region A geographic area with (usually) 3+ AZs — Region-wide control-plane problems, large disasters, regional deploys gone wrong
Edge location / PoP Small sites close to users for CDN, DNS, WAF — —

Terminology differs slightly:

  • AWS: regions (ap-south-1), AZs (ap-south-1a; zone names are shuffled per account, so use AZ IDs like aps1-az1 to compare across accounts), Local Zones (metro extensions), Wavelength (5G edge), Outposts (AWS racks on-premises).
  • Azure: regions with availability zones (in supported regions), region pairs for disaster recovery, plus fault domains and update domains for availability sets (racks and maintenance batches).
  • Google Cloud: regions (asia-south1) and zones (asia-south1-a); many services are regional or multi-regional by design; Google's global network makes some resources global (VPCs, load balancers).

Scope of resources

Every cloud resource has a scope, and it determines what fails together:

  • Zonal: a VM, a block disk, a single-AZ subnet. If the zone fails, it fails.
  • Regional: S3 buckets (data stored across AZs), DynamoDB tables, SQS queues, regional load balancers, managed databases with multi-AZ standbys.
  • Global: IAM, Route 53, CloudFront, GCP VPCs and global load balancers, Azure Front Door, Entra ID.

Designing for availability is mostly about spreading across the right scope: multi-AZ for most production workloads; multi-region only when the business case (availability targets, latency, regulation) justifies its cost and complexity (Vol. 12).

The core primitives

Everything in a cloud is built from a handful of primitives (the following chapters cover each in depth):

Primitive Examples Chapter
Compute VMs, containers, Kubernetes, functions, batch 86
Network Virtual networks, subnets, routes, gateways, load balancers, DNS, CDN 87
Storage Object, block, file 88
Identity Users, roles, policies, federation, workload identity 89
Managed services Databases, queues, streams, caches, search, analytics, AI 90
Observability and management Metrics, logs, traces, audit trails (CloudTrail, Activity Log, Cloud Audit Logs), config inventory Vol. 9

Control plane and data plane

Every cloud service has two parts:

  • The control plane handles management operations: create, update and delete resources, change configuration (API calls like RunInstances, CreateBucket, PutRolePolicy). It's complex and changes often.
  • The data plane does the actual work: running instances, serving GetObject requests, routing packets, answering DNS queries. It's simpler and engineered to be more available.

Design lesson (from AWS's "static stability" principle): your recovery should depend on data planes, not control planes. During an incident, the ability to launch new instances (control plane) may be impaired exactly when you need it. Systems that already have enough capacity running in each AZ (pre-provisioned, not dependent on scaling during the event), and failover mechanisms that only change data-plane state (health-checked DNS, rather than editing records through the API), keep working.

Everything is an API

Every action in the cloud, from the console to Terraform, is an authenticated, authorised, audited API call. That's what makes infrastructure as code (Vol. 8) possible, and why identity is the security perimeter (chapter 89).

# AWS CLI: identity, regions and zones (with AZ IDs, which are consistent across accounts)
aws sts get-caller-identity
aws ec2 describe-regions --query 'Regions[].RegionName' --output text
aws ec2 describe-availability-zones --region ap-south-1 \
  --query 'AvailabilityZones[].[ZoneName,ZoneId,State]' --output table

Azure (az account list-locations, az vm list-skus --zone) and GCP (gcloud compute regions list, gcloud compute zones list) have direct equivalents, and every SDK follows the same pattern: a credential chain, a region, a client, a request.

Properties you design for

Elasticity versus scalability

  • Scalability is the ability to handle more load by adding resources: vertically (bigger machine) or horizontally (more machines). It's a property of your architecture: stateless services, partitioned data, no single bottlenecks.
  • Elasticity is the ability to add and remove resources automatically as load changes, so capacity tracks demand (and cost tracks capacity). It's a property of the platform plus your configuration: autoscaling groups, Kubernetes HPA and Karpenter, serverless.

A system can be scalable without being elastic (you add servers by hand before Black Friday), and elasticity is useless if the architecture can't scale (adding web servers in front of one saturated database).

Elasticity limits: VMs take minutes to boot and warm up; containers seconds; functions milliseconds to seconds (with cold starts). Scaling policies must react before saturation, so keep headroom, scale on leading indicators (queue depth, concurrency) and pre-scale for known events.

Availability

Availability is the fraction of time (or requests) a system works correctly. It's expressed in "nines":

Availability Downtime per year Per month (30 d)
99% 3.65 days 7.2 h
99.9% 8.77 h 43.2 min
99.95% 4.38 h 21.6 min
99.99% 52.6 min 4.32 min
99.999% 5.26 min 26 s

Arithmetic you need:

  • Serial dependencies multiply: a request needing A (99.9%) and B (99.9%) and C (99.9%) succeeds ~99.7% of the time. Every hard dependency lowers your ceiling.
  • Redundancy (parallel) multiplies failure probabilities: two independent instances at 99% each, with failover, give 1 − (0.01 × 0.01) = 99.99%. The key word is independent: replicas in the same AZ, behind the same deploy pipeline or sharing a config bug fail together.
  • Provider SLAs are financial commitments (service credits), not guarantees of behaviour. A single EC2 instance is covered at roughly 99.5%; multi-AZ deployments of a service are covered at 99.99%. Your own availability target (an SLO, Vol. 9) should be set from user needs, then designed for.
series (all required) API 99.9% DB 99.9% payments 99.9% ≈ 99.7% parallel (either suffices) replica AZ-a 99% replica AZ-b 99% load balancer 1 − 0.01² = 99.99%only if failures are independent
Availability arithmetic. Hard dependencies in series reduce availability (each multiplies in); independent redundant replicas in parallel raise it (failure probabilities multiply). Correlated failures (same zone, same deploy) break the independence assumption.

Availability techniques at the cloud level:

  • Multi-AZ for every stateful and stateless tier (load balancers across zones, database standbys, replicas spread with topology constraints).
  • Health checks and automatic replacement (autoscaling groups, Kubernetes, managed services).
  • Static stability: enough capacity in the surviving zones to absorb a zone loss without scaling up (with 3 AZs, run at ≤ 66% utilisation; with 2, ≤ 50%).
  • Avoid single points of failure you might not notice: one NAT gateway in one AZ, one region-scoped secret store, a single CI system needed for rollback.

Durability

Durability is the probability that stored data isn't lost. It's different from availability: data can be durable but temporarily unavailable (a region outage), or available but not durable (a cache).

  • Amazon S3 Standard is designed for 99.999999999% (11 nines) annual durability of objects, by storing data redundantly across at least 3 AZs and continuously checking and repairing it. Azure (LRS/ZRS/GRS) and GCS publish similar designs.
  • Block storage is replicated within an AZ (EBS volumes have annual failure rates around 0.1–0.2%, or 0.001% for io2): durable against disk failure, not against AZ loss. Take snapshots (stored regionally).
  • Durability doesn't protect against you: deletion, overwrites, ransomware and bugs are replicated faithfully. You need versioning, backups, point-in-time recovery, object lock (immutability) and cross-account/cross-region copies (chapter 88).

Multi-tenancy

Cloud providers run many customers on shared hardware. Their isolation mechanisms:

  • Hypervisors: AWS Nitro (dedicated hardware cards for networking, storage and security, with a minimal hypervisor), Azure's Hyper-V-based hosts, Google's KVM-based hosts with Titan security chips. Confidential computing (AMD SEV-SNP, Intel TDX, AWS Nitro Enclaves) protects data even from the host.
  • Logical isolation: accounts/subscriptions/projects, VPCs, IAM.
  • Performance isolation: per-tenant quotas, rate limits and throttling (API throttling errors are normal; SDKs retry with backoff).

The same questions apply to your SaaS systems when you serve many customers (Vol. 12): pooled versus siloed tenants, noisy-neighbour control, per-tenant quotas, and data isolation.

Noisy neighbours in the cloud: burstable instance types (t-family) share CPU credits; shared tenancy can affect cache and memory bandwidth (mostly mitigated by modern hardware and dedicated cores); dedicated hosts and instances exist for compliance or licensing.

Accounts, quotas and pricing

Organisation structure

  • AWS: Organizations with many accounts (the account is the strongest isolation and billing boundary), grouped in organisational units with service control policies; set up with Control Tower landing zones. Typical layout: management, security/audit, log archive, shared networking, and separate workload accounts per environment and team.
  • Azure: Entra ID tenant → management groups → subscriptions → resource groups; Azure Policy at any level; "landing zone" reference architectures.
  • GCP: organisation → folders → projects; organisation policies; IAM inherited down the hierarchy.

Separate production from non-production at the account/subscription/project level: it limits blast radius, simplifies permissions, and makes cost attribution easy.

Quotas and limits

Every service has quotas (vCPUs per instance family per region, VPCs per region, Lambda concurrency, API request rates). Some are adjustable via a request, some are hard limits. Hitting a quota during a scale-up or a disaster-recovery failover is a classic outage; review quotas in every region you might fail over to (Service Quotas, Azure quotas, GCP quotas pages).

Pricing models

Model Discount vs on-demand Commitment Good for
On-demand — None Spiky, unknown or short workloads
Savings plans / committed use discounts / reservations Roughly 30–70% 1 or 3 years of spend or capacity Steady baseline load
Spot / preemptible / Azure Spot Up to ~90% None, but can be reclaimed with ~2 minutes' notice (30 s on GCP) Fault-tolerant batch, CI, stateless workers, Kubernetes nodes with diversification
Free tier / always-free — — Learning and tiny workloads

Often-surprising costs: data transfer (internet egress, cross-AZ and cross-region traffic), NAT gateway processing charges, idle resources (unattached disks, old snapshots, forgotten test environments), log ingestion and retention, and per-request charges on high-volume object storage. Chapter 91 covers cost optimisation; Vol. 8 covers FinOps practices.

Choosing a region

Factor Question
Latency Where are your users? (Mumbai users to ap-south-1 ≈ 5–20 ms; to us-east-1 ≈ 200 ms)
Data residency and sovereignty Must data stay in a country or legal jurisdiction (GDPR transfers, India's DPDP Act rules, sector regulators)? Sovereign offerings exist, such as the AWS European Sovereign Cloud (launched January 2026), Azure and Google sovereign cloud partnerships, and government regions
Service availability Is every service and instance type you need available there? New services launch in a few regions first
Cost Prices differ by region (sometimes 10–30%)
Disaster recovery pairing Is there a suitable second region (distance, same jurisdiction)?
Sustainability Grid carbon intensity differs a lot by region (chapter 91)

Lab: availability, elasticity, durability and distance in numbers

Python calculations and simulations. Prices and SLAs are from the providers' published pages in October 2026: EC2 instance-level SLA 99.5% and region-level 99.99%, RDS Multi-AZ 99.95%; m7g.large (2 vCPUs, 8 GiB, Graviton3) on-demand in ap-south-1 at $0.0583 per hour and a spot price around $0.0396 in one zone. Re-check them before relying on them.

Experiment 1: when redundancy isn't independent

200 simulated years, hour by hour. Each zone is unavailable 0.05% of hours, independently; in the second run, rare "shared-cause" events (a bad global deploy, a control-plane bug) also hit both zones together 0.01% of hours:

Text
zones fail independently:                         one zone 99.949%, two zones 99.99994%  (0 min/year down)
zones fail independently + rare shared-cause:     one zone 99.937%, two zones 99.99035%  (51 min/year down)

With independent failures, two zones were down together almost never. A shared cause that is rarer than either zone's own failures made it the dominant source of downtime. Real cloud incidents follow this pattern: the largest outages are regional control-plane, DNS, identity or configuration problems that hit every zone at once. Design responses: avoid deploying everywhere at once (deploy zone by zone, cell by cell), keep static stability (systems keep running on their last known good state when control planes fail), and for the most critical workloads, a second region.

Experiment 2: paying for peaks

A tiffin-ordering service whose load follows breakfast, lunch and dinner peaks (150 to 2,750 requests per second over a day); one m7g.large handles 200 req/s at the target latency; capacity is sized with 20% headroom:

Text
fixed for peak:          17 instances × 24 h = 408 instance-hours, $23.79/day, $714/month
scaled hourly (min 2):   123 instance-hours, $7.17/day, $215/month (70% less)
same, above 2 on spot:   $5.77/day, $173/month (76% less than fixed)
instances per hour: 2 2 2 2 2 2 2 3 8 8 3 3 10 17 10 3 2 2 2 6 12 12 6 2

Sizing for the peak all day paid for 285 instance-hours of idle capacity. Scaling with the load (keeping at least two instances in two zones) cut the bill by 70%, and running the variable part on spot capacity (spare capacity sold at a discount, reclaimable with a two-minute warning) cut it further. The real constraints: scaling isn't instant (instances take a minute or more to boot and warm up, so scale ahead of predictable peaks with scheduled or predictive scaling), and spot is only for work that tolerates interruption.

Experiment 3: what eleven nines means

Text
10 million objects at 99.999999999% annual durability: expected 0.0001 objects lost per year → one object every 10,000 years
one accidental 'delete everything' script without versioning: 10,000,000 objects lost in seconds

The provider's durability engineering (copies across zones, checksums, continuous repair) makes hardware-caused loss negligible. The realistic risks are operational: deletes and overwrites by your own code or people, compromised credentials, lifecycle rules that expire the wrong prefix. Versioning, object lock (WORM), MFA delete, cross-account backups and least-privilege delete permissions address those (chapters 88 and 89).

Experiment 4: distance sets a latency floor

Light in optical fibre travels at about 200,000 km/s (two-thirds of its speed in a vacuum). Round-trip floors from Mumbai, along the great-circle distance:

Text
Mumbai → Hyderabad  :    622 km; best possible round trip   6.2 ms
Mumbai → Chennai    :  1,033 km; best possible round trip  10.3 ms
Mumbai → Singapore  :  3,904 km; best possible round trip  39.0 ms
Mumbai → Frankfurt  :  6,564 km; best possible round trip  65.6 ms
Mumbai → N. Virginia: 12,861 km; best possible round trip 128.6 ms

Real cables follow coastlines and seabeds and pass through routers, so measured round trips are typically 1.5–2× these figures. No engineering removes the floor. A web page making 10 sequential API calls from India to a backend in N. Virginia spends well over a second in transit alone, which is why region choice follows users, why chatty protocols need batching, and why synchronous replication across continents is rare (chapters 69–71). AWS (Mumbai and Hyderabad), Azure (Pune, Chennai, Mumbai) and Google Cloud (Mumbai, Delhi) all have regions in India, which also matters for data-residency requirements.

Try it yourself

  1. Add a fourth dependency to experiment 1 (an identity service at 99.95%) and find the new weakest link.
  2. Replace the hourly scaling in experiment 2 with scaling that reacts 10 minutes late. How much headroom do you need to avoid overload at the lunch ramp?
  3. In a real account, use the AWS Pricing Calculator to price experiment 2's design with a 1-year Compute Savings Plan.
  4. Measure real round-trip times from your machine to regions with ping or a cloud provider's latency test page, and compare with experiment 4's floors.

Revision sheet: cloud fundamentals

Key ideas

  • Cloud: on-demand, self-service, elastic, measured, managed; IaaS, CaaS, PaaS, FaaS, SaaS; shared responsibility.
  • Physical hierarchy: regions, availability zones, local zones and edge locations (CDN, DNS); fault domains and placement.
  • Core primitives: compute, block/file/object storage, virtual networks, identity, managed data services, messaging, observability.
  • Properties: availability (serial vs parallel composition), durability, elasticity, scalability, latency, consistency, multi-tenancy and noisy neighbours.
  • Accounts, quotas and pricing: account/subscription/project structure, service quotas, on-demand vs commitments (savings plans, reserved, committed use) vs spot/preemptible, data transfer costs, budgets and tagging.
  • Choosing a region: users' latency, data residency and regulation, service availability, price, sustainability, disaster-recovery pairing.

Numbers to remember

  • 99.9% ≈ 44 min/month; 99.95% ≈ 22 min; 99.99% ≈ 4.4 min.
  • EC2: 99.5% per instance, 99.99% across ≥2 AZs; RDS Multi-AZ 99.95%; S3 Standard 99.9% SLA, 11 nines durability design.
  • Light in fibre ≈ 200 km per ms one way.
  • Lab: a rare shared cause turned 0 to 51 min/year of two-zone downtime; scaling with load cut cost 70% (76% with spot); Mumbai–N. Virginia floor 129 ms round trip.

Pitfalls

  • Single-instance or single-zone production deployments.
  • Multiplying "independent" availabilities that share a cause.
  • Treating SLA credits as insurance.
  • Ignoring data transfer and NAT costs.
  • Choosing regions by habit rather than users and regulation.
  • No budgets or alerts on new accounts.

Glossary

  • SLA / SLO: contractual commitment / internal target.
  • Service credit: the refund paid when an SLA is missed.
  • Static stability: continuing to operate without the control plane during failures.
  • Spot / preemptible: discounted capacity that can be reclaimed.
  • Data residency: requirements on where data is stored and processed.
  • Quota: a per-account limit on resources or API rates.