Compute in the Cloud
Virtual machines, auto-scaling groups, and load balancers - the building blocks behind "just add more servers."
On this page5 sections
Strip away the marketing names, and a cloud "instance" is a virtual machine running on someone else's hardware - everything you already know about Linux processes, memory, and disk applies directly.
Instance types and sizing
Providers sell VMs in fixed "shapes" - a combination of vCPUs, memory, and sometimes GPU or local disk, bundled into a named size (small, medium, large, and dozens of finer-grained tiers). Picking the right size is mostly about matching your workload's actual CPU and memory profile instead of guessing high "to be safe," which just burns money.
Auto-scaling
An auto-scaling group keeps a fleet of identical instances running, and adjusts the count automatically based on a metric - almost always CPU usage or request count:
if average CPU > 70% for 5 minutes:
add an instance
if average CPU < 20% for 15 minutes:
remove an instance
This is the mechanism behind "the site scaled up for the traffic spike and back down afterward" - no human watching a dashboard and deciding in the moment.
Load balancers
A load balancer sits in front of that fleet and spreads incoming traffic across every healthy instance. It also does continuous health checks, and quietly stops sending traffic to any instance that stops responding - so one bad instance doesn't become one bad outage.
Ephemeral vs. persistent
A cloud instance should be treated as disposable - auto-scaling can terminate it at any time, and a crashed instance might simply get replaced rather than repaired. Anything that needs to survive that (a database, uploaded files) belongs on persistent, separately-managed storage - never on the instance's own local disk.
Try it
Every instance is still just a Linux machine you can inspect the normal way:
ps aux
When you're ready, hit Mark complete and move to the next lesson.
Challenge
A cloud instance is really just a Linux box underneath - list every running process to see what's using its CPU.
Want to experiment first? Try things in the practice terminal (opens in a new tab), then enter the command that solves the task here.
Quiz
Lock in the concepts. Score at least 80% to mark the lesson complete.
Done with this one?
Skipped the challenge? You can mark the lesson complete by hand.