Cloud building blocks
A cloud as resources behind an API: who operates them, where they can fail, what you pay for; compute, VPC networking, data, IAM; headroom for zone loss and pricing models.
Three axes of choice
A cloud account is not "someone else's computer" in the abstract — it is a catalog of building blocks behind an API: compute, network, storage, identity, managed databases, queues. The catalog grows every year; the decision framework does not. Key idea. Choose each block on three axes: who operates it (the provider's control plane vs your team), where it can fail (machine, availability zone, region, global control plane), and what you pay for (wall-clock time, provisioned capacity, per-request, per-byte egress).
Operated-by-you means patches, capacity and 3 a.m. pages land on your on-call. Operated-by-provider means you trade that toil for opaque limits, regional outages you cannot SSH into, and a support ticket. Failure domains nest: a disk dies inside a machine; a power event takes a zone; a bad routing change can take a region. Design for the domain you refuse to share fate with. Pricing is not a footnote — a choice that looks cheap at 10 RPS can dominate the bill at 10 000 RPS because egress or per-request fees scale linearly while a reserved VM does not.
Compute and price
Virtual machines, containers-as-a-service and functions differ on those axes. A toy VM at 58.40**/month whether it serves 0 or 5 000 RPS — you pay for provisioned capacity. Functions bill GB·s + per invocation: a 256 MB handler running 100 ms costs roughly $0.0000042 per call at common list prices; at 1 M calls/month that is a few dollars of compute, but at 100 M calls with 1 s duration the same model can exceed a small always-on fleet. Choose functions for spiky, idle-most-of-the-time work; choose VMs/containers when steady load fills the machine.
To survive one zone loss while peak needs 6 instances of capacity across the remaining zones, place capacity so each of three zones holds enough that two zones still sum to 6 — that is 9 instances (3 per zone). Layout 2+2+2 leaves only 4 after a zone fails and you miss the peak. Stateless frontends scale this way; a singleton writer in one zone does not — move that dependency to a multi-AZ managed store or accept a hard dependency on that zone.
Cold starts matter at the edge of the price axis. A function that needs 3 s to load a 400 MB model cannot meet a 200 ms latency SLO no matter how cheap the idle bill looks; keep a warm pool or run the model on always-on containers.
VPC and data
Plan address space early. A /16 like 10.0.0.0/16 gives 65 534 usable addresses — enough for years of subnet carving. Typical pattern: public and private subnets per zone; internet-facing load balancers in public subnets; application tiers and data stores in private ones with egress via NAT only where required. Overlapping CIDRs between VPCs or with on-prem CIDRs make later peering painful — pick non-overlapping ranges before the first terraform apply.
Object storage (S3-class) and managed databases trade ops burden for provider limits: request rate quotas, storage class pricing, backup windows you do not control. Design clients for retries with jitter against 503s from the control plane. IAM least privilege: a log shipper needs PutObject to the logs bucket and read of its own config — not account admin. Long-lived access keys in Git are incidents waiting to happen; prefer instance roles and short-lived OIDC federation from CI (the same habit returns in the IaC and CI topics).
Egress fees are the silent axis. 10 TB/month leaving a region at 900 — often more than the compute that produced the bytes. Keep chatty tiers in the same AZ when you can; compress; cache at the edge.
Pricing models
On-demand vs reserved/committed use vs spot/preemptible: reserved beats on-demand when utilization . Toy numbers , → break-even at 0.6 — if the instance is needed more than 60% of the month, commit. Spot is cheaper still (often 60–90% off) but the provider can reclaim with little notice; use it for stateless workers with queue backlog and spare capacity, not for the sole replica of a stateful writer.
Managed services cut toil — no more self-hosted Kafka pages — but they do not remove the need for SLOs, quotas and multi-AZ design. A managed database with a 99.95% regional SLO still burns error budget when you treat it as 100%. Capstone habit: every block you add to the architecture should have an explicit answer on the three axes, a failure mode you have rehearsed, and a line on the monthly bill at today's and 10× traffic.
Tag every billable resource with owner, service and environment on day one — cost allocation without tags is archaeology. Budgets and anomaly alerts on the bill are production signals: a sudden 3× egress spike is often a bug or a data loop, not growth.
Next: Kubernetes: desired state and reconciliation — when the unit of compute is no longer "a VM we SSH into" but a fleet of Pods the control plane keeps aligned with a declared spec.
Check your understanding
The same questions as in Pulse. Answers are shared between modes.
Answers are saved on the server and tied to this browser until you sign in.