Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.1.2. Compute Engine: Instances, Storage, and Machine Types

💡 First Principle: A Compute Engine instance's configuration choices — its machine type, its attached storage, its availability policy — aren't independent settings, they're a bundle of tradeoffs where optimizing one (cost) usually means giving something up elsewhere (guaranteed availability or performance).

Launching an instance means choosing a machine type (predefined, like e2-standard-4, or custom, letting you specify exact vCPU/memory ratios a predefined type doesn't offer), an availability policy (whether the instance should be automatically restarted after maintenance, and its behavior on host maintenance events), and SSH keys for remote access (managed per-instance, per-project, or centrally via OS Login). For storage, zonal Persistent Disk is the default — reliable, attached to a single zone — while regional Persistent Disk synchronously replicates across two zones in a region for higher availability at added cost, and Hyperdisk is Google's newer, higher-performance block storage option with independently configurable IOPS and throughput. Configuring OS Login centralizes SSH access management through IAM roles instead of manually distributing public keys per instance, and VM Manager provides fleet-wide patch management, configuration management, and OS inventory reporting.

Spot VM instances offer steep discounts (typically 60-91% off on-demand pricing) in exchange for Google being able to reclaim the instance with short notice — making them ideal for fault-tolerant batch jobs, not stateful production services.

⚠️ Exam Trap: Spot VMs are just a cheaper Compute Engine option with no functional tradeoff — that's the misconception the discount is designed to make attractive, but Spot VMs can be reclaimed by Google at any time with short notice, so workloads must tolerate interruption; they suit batch/fault-tolerant jobs, not anything requiring guaranteed uptime.

Reflection Question: A workload needs a very specific 1:12 vCPU-to-memory ratio that none of the predefined machine types offer. What Compute Engine feature solves this without over-provisioning either resource?

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder18 professional certifications