Cloud services
What each cloud building block is for, what it costs, and when to self-host.
Choosing
Providers and the build-vs-buy line.
Cloud providers compared
AWS, GCP and Azure sell breadth and managed services; Hetzner, OVH, Cloudflare and neoclouds sell raw compute, bandwidth or GPUs at a fraction of the price.
Self-host vs managed
Managed services trade a 2-5x price premium for not paging your team; self-hosting wins once the bill is large, steady and the system is well understood.
Compute
Where code runs.
VMs and bare metal
Rented virtual machines and dedicated servers: instance families, local NVMe vs network disks, spot pricing, and when a $100 bare-metal box beats a $1000 VM.
Containers and Kubernetes
Containers package a service with its dependencies; Kubernetes schedules them across machines. Use the smallest orchestrator that does the job.
Serverless functions
Lambda, Cloud Run functions, Azure Functions and Cloudflare Workers run code per request and bill per millisecond; ideal for spiky or glue workloads, costly at steady high load.
GPU cloud
Where to rent GPUs for training and inference: hyperscalers for integration, neoclouds for price, spot and marketplaces for cheap batch work; interconnect decides multi-node training.
Data services
Managed storage and databases.
Object storage
S3-compatible blob storage at cents per GB-month with 11 nines durability; pick by egress price, request price and latency, not by storage price alone.
Managed databases
RDS, Aurora, Cloud SQL, Spanner, DynamoDB, Cosmos DB and the Postgres startups: what each is for, what it costs, and the limits that bite.
Caches and queues
Managed Redis/Valkey and Memcached for hot data; SQS, Pub/Sub, Service Bus, Kafka and NATS for moving work and events. Pick by delivery semantics, ordering and throughput.
Network & edge
Getting close to users.
CDN and edge
CDNs cache content in hundreds of PoPs near users, cutting latency and egress bills; edge compute runs small code there. Bandwidth price spreads 10x between providers.
DNS and load balancers
DNS routes users to a region, L4 load balancers spread connections, L7 balancers route requests; managed ones cost per hour plus per unit of traffic.
Operations
Running it without surprises.
Observability
Metrics, logs and traces tell you what broke and why; the cost is driven by log volume and metric cardinality, so design for both from day one.
Cost control
Cloud bills grow from idle resources, egress, cross-zone traffic and on-demand pricing; tagging, budgets, commitments, spot and architecture fixes cut them 30-70 %.
Infrastructure as code
Declare servers, networks, DNS and permissions in versioned files and let a tool converge reality to them; Terraform/OpenTofu for most teams, Pulumi or CDK when you want a real language.
Datacenter facilities
Power and cooling for the buildings clouds run in.
datacenter cooling
Planned.
power oversubscription capping
Planned.
ups power distribution
Planned.