Cloud computing fundamentals
Cloud computing fundamentals for IoT: basic definitions, architecture, key properties (elasticity, scalability, availability), virtualization and containers, storage and data patterns, edge vs cloud trade-offs, reliability and performance formulas, worked examples and exam guidance.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Cloud computing provides the remote infrastructure and services that collect, store, process and analyze data from IoT devices. An engineer uses cloud fundamentals to design reliable, scalable and cost‑effective IoT back ends, decide what runs at the edge vs in the cloud, and meet SLAs (service level agreements) for availability and latency.
Key ideas
Start from first principles and simple definitions (each defined term is bold and then used).
Cloud computing — delivery of computing services (compute, storage, network, databases, analytics) over a network (usually the Internet) on-demand. Assumes remote datacenters operated by a provider and pay-as-you-go access.
Virtualization — technique to run multiple logical machines on one physical host by abstracting hardware. A virtual machine (VM) provides virtualized hardware on which a guest OS runs (hardware is virtualized, not necessarily emulated). Assumption: hypervisor manages resource isolation and scheduling.
Container — lightweight runtime that packages application and its dependencies; shares host OS kernel (unlike VMs). Example runtimes: Docker, containerd.
IaaS (Infrastructure as a Service) — cloud model that provides virtualized hardware (VMs, networks, block storage) to users.
PaaS (Platform as a Service) — provides higher-level runtime and services (databases, middleware) so developers deploy apps without managing OS/VM.
SaaS (Software as a Service) — ready-to-use applications hosted by provider (e.g., email, CRM).
FaaS / Serverless — function execution model where developer supplies functions and provider runs them on demand, charging by execution time and resources.
Multi-tenancy — principle that multiple customers (tenants) share the same physical resources while keeping logical separation.
Elasticity — ability to automatically increase or decrease resources (instances, containers) in response to load. Distinct from scalability, which is the system's ability to handle increased load by adding resources (vertical = larger instances, horizontal = more instances).
High availability (HA) — design that ensures service uptime despite failures. Formal availability is defined later in formulas.
Latency — time delay between a request and response (units: seconds). For IoT, end-to-end latency includes device processing, network transit, and cloud processing.
Throughput — rate of successful data transfer or processed requests per unit time (units: bits/s or requests/s).
Edge computing — processing close to the devices (gateways or on-device) to reduce latency and bandwidth use. Trade-off: less central control vs lower latency and reduced data transfer costs.
Data storage types: object storage (blob, good for raw telemetry, cost‑efficient, high durability; consistency model depends on provider—many now offer strong read‑after‑write), block storage (attached volumes for VMs, strong consistency), database storage (relational for transactions, NoSQL/TSDB for high‑scale time‑series).
Stream processing vs batch processing: Stream = continuous processing of events with low latency (e.g., windowed aggregations using Kafka, Flink). Batch = process large data sets periodically.
Identity and Access Management (IAM) — access control framework in cloud: users, roles, policies. Basic security controls: encryption at rest and in transit, network isolation (VPC), key management. Also know the shared responsibility model (provider secures the cloud infrastructure; customers secure what they configure and run in the cloud) and enforce least privilege and MFA.
SLA (Service Level Agreement) — contractual guarantee of availability, performance, and support levels. SLA numbers guide architecture (e.g., multiple AZs for 99.99% vs single AZ for lower cost). A region is a set of data centers in a geographic area; an Availability Zone (AZ) is an isolated data center (or group) within a region. Multi‑AZ designs spread failure domains.
Important laws and derivations commonly asked in exams:
Availability for redundant components (identical, independent failures). If single component availability = A (probability operational at a random time), then for n identical components deployed in parallel (service works if at least one component works):
- Exact formula: A_parallel = 1 - (1 - A)^n.
- Assumptions: independent failures; each component availability = A; no common-mode failures.
- Derive by probability that all fail = (1 - A)^n; complement gives at least one working.
Diagram to draw: Draw n parallel boxes labelled Component 1 .. n. Show input arrow to a OR node (circle) whose output goes to Service. Label probabilities A and (1-A).
Reliability of series systems (all components must work): R_series = Π_i R_i. For identical R: R_series = R^n. Assumption: independent failures; series means single component failure breaks service. Here, reliability R(t) is the probability a component/system operates without failure over a time interval t, whereas availability A is the steady‑state probability the system is operational (accounting for repair).
Little's law (queues) — statement and derivation often required.
- Little's law: For a stable queueing system in steady state, L = λ·W.
- Define: L = average number of items in system, λ = arrival rate (items per second), W = average time an item spends in system (seconds).
- Assumptions: system stable (long-term arrival rate equals long-term departure rate), averages exist. Derivation: Over time T, number of arrivals ≈ λT. Total time spent by all items ≈ sum of each W_i ≈ L·T. So L·T ≈ λT·W => L = λ·W.
Bandwidth-Delay Product (BDP) — useful for buffer sizing: BDP = bandwidth × RTT. Assumption: link fully utilized and RTT measured in seconds.
Draw architecture diagram for IoT-cloud: at bottom many small devices (label sensors, actuators). Arrows to Gateway / Edge Processor (label protocol: e.g., MQTT). Arrow from gateway to Cloud Ingress (load balancer). Inside cloud draw compute (containers/VMs), storage (object, DB), stream processor, analytics. Show feedback arrow back to devices for actuations.
Formulas
Each formula on its own line; then symbol meanings and units.
Availability_parallel = 1 - (1 - A)^n — A = availability of one component (dimensionless probability, e.g., 0.999), n = number of identical parallel components (unitless). Applies when failures are independent and service works if at least one component works.
Availability_series = Π_i A_i — A_i = availability of i-th component (dimensionless). Applies when all components must work for service to operate.
Downtime_per_period = (1 - Availability) × Period — Period in seconds (or hours). Gives expected downtime over that period.
Availability = MTBF / (MTBF + MTTR) — MTBF = mean time between failures (time), MTTR = mean time to repair (time). Applies to repairable systems with steady‑state behavior.
Unavailability = 1 - Availability = MTTR / (MTBF + MTTR) — dimensionless. Useful for quick downtime estimates.
L = λ · W — Little's law. L = average number in system (items), λ = arrival rate (items/s), W = average time in system (s). Applies in steady state.
BDP = Bandwidth × RTT — Bandwidth in bits/s, RTT in s, BDP in bits. Use to size TCP windows or buffers.
Throughput (bytes/s) = Total_bytes_transferred / Transfer_time — simple definition.
Cost formulas (pay-as-you-go): Cost_total = Σ (unit_price_i × usage_i) — unit_price in currency per unit (e.g., $/hour, $/GB), usage_i in corresponding units.
Worked examples
Example 1 — Availability with redundancy Problem: A single server has availability 99.9% (0.999). You deploy two identical independent servers in parallel. What is the resulting availability and expected downtime per year? Show steps. Solution:
- Use
Availability_parallel = 1 - (1 - A)^n. - Plug A = 0.999, n = 2: Availability_parallel = 1 - (1 - 0.999)^2 = 1 - (0.001)^2 = 1 - 1e-6 = 0.999999.
- Hours per year = 365 × 24 = 8760 hours. Downtime per year = (1 - 0.999999) × 8760 h = 1e-6 × 8760 h = 0.00876 h.
- Convert to seconds: 0.00876 h × 3600 s/h = 31.536 s. Answer: Availability = 99.9999% (0.999999); expected downtime ≈ 31.5 seconds/year.
Example 2 — Bandwidth-delay product and buffer sizing Problem: An IoT gateway connects to cloud over a link with 10 Mbps bandwidth and RTT = 50 ms. What is the BDP in bytes and what TCP window is needed to fully utilize the link? Solution:
- BDP = Bandwidth × RTT = 10×10^6 bits/s × 0.05 s = 500,000 bits.
- Convert to bytes: 500,000 bits ÷ 8 = 62,500 bytes ≈ 61.0 KiB.
- So TCP send window should be ≥ 62.5 KB to keep link full. Since 62.5 KB < 65,535 bytes, TCP window scaling is not required in this case. Answer: BDP = 500,000 bits = 62,500 bytes (~61 KB).
Example 3 — Simple monthly cost estimate for IoT ingestion Problem: 1000 devices each send 10 MB/day to the cloud. Cloud charges: VM $0.05 per hour, object storage $0.10 per GB-month, data transfer $0.09 per GB. We run one VM continuously. Estimate monthly cost (30 days). Solution:
- Data per day = 1000 devices × 10 MB = 10,000 MB = 10 GB/day.
- Data per 30-day month = 10 GB/day × 30 = 300 GB/month.
- VM hours per month = 24 × 30 = 720 h. VM cost = 720 h × $0.05/h = $36.00.
- Storage cost = 300 GB × $0.10/GB-month = $30.00.
- Data transfer cost = 300 GB × $0.09/GB = $27.00.
- Total cost = $36 + $30 + $27 = $93.00. Answer: Estimated monthly cost ≈ $93.00 (does not include other services like DB or monitoring).
Common mistakes
- Forgetting units in BDP (bits vs bytes). Always convert consistently.
- Treating latency and throughput as interchangeable; they measure different things and have different trade-offs for IoT.
- Estimating costs but omitting egress or storage or forgetting to multiply instance price by hours/month.
For your exam
Question types you will see: definitions (e.g., define cloud computing, virtualization), short notes (differences IaaS/PaaS/SaaS, edge vs cloud), derivations (derive availability for n parallel servers, derive Little's law), numericals (compute BDP, availability downtime, cost estimation), diagrams (draw IoT-to-cloud architecture and label components), and design questions (choose storage and compute strategy for given latency and cost requirements).
What full-marks answers include:
- Precise definitions of bolded terms and clear assumptions.
- Correct formulas with units and derivations (show steps). For derivations: state assumptions (independence, steady state), show algebra, and compute numeric examples with units carried through.
- For diagrams: neatly labelled devices, gateway/edge, cloud ingress, compute, storage, analytics, and arrows for data flow and control.
- For design questions: justify choices (cost vs latency vs reliability), include SLA targets and simple calculations to show they are met.
Quick check
- State Little's law and one assumption needed for it.
- For three identical servers of availability 0.98 in parallel, compute overall availability (write formula and value).
- If link bandwidth = 5 Mbps and RTT = 100 ms, what is BDP in kilobytes (KB)?
Answers: Little's law: L = λ·W; assumption: steady state (arrival rate = departure rate) — For Q2: A_parallel = 1 - (1 - 0.98)^3 = 1 - (0.02)^3 = 1 - 8e-6 = 0.999992 => 99.9992% — For Q3: BDP = 5e6 b/s × 0.1 s = 500,000 bits = 62,500 bytes ≈ 61.0 KB.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?