You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Compute Engine is GCP's Infrastructure as a Service (IaaS) offering. It lets you create and manage virtual machines (VMs) running on Google's infrastructure. You have full control over the operating system, software, and configuration.
Compute Engine provides:
Compute Engine offers predefined machine families optimised for different workloads:
| Family | Series | Best For |
|---|---|---|
| General purpose | E2, N2, N2D, N1 | Balanced workloads, web servers, small databases |
| Compute optimised | C2, C2D, H3 | CPU-intensive workloads, gaming, HPC |
| Memory optimised | M1, M2, M3 | In-memory databases, large caches |
| Accelerator optimised | A2, A3, G2 | Machine learning training and inference, GPU workloads |
| Storage optimised | Z3 | High-throughput storage workloads |
Machine type names follow the pattern: family-cpus
| Machine Type | vCPUs | Memory |
|---|---|---|
e2-micro | 0.25 shared | 1 GB |
e2-medium | 1 shared | 4 GB |
n2-standard-4 | 4 | 16 GB |
n2-standard-8 | 8 | 32 GB |
c2-standard-16 | 16 | 64 GB |
If predefined types don't fit your needs, you can create custom machine types:
gcloud compute instances create my-vm \
--custom-cpu=6 \
--custom-memory=24GB \
--zone=europe-west2-a
This lets you right-size your VM to avoid paying for unused resources.
Every VM boots from an image — a template containing the OS and pre-installed software.
Google provides public images for:
You can create your own images from an existing disk, or import them from on-premises.
The boot disk is the VM's primary disk containing the OS:
Persistent disks are network-attached storage that survive VM deletion (if configured):
| Disk Type | Performance | Use Case |
|---|---|---|
| Standard (pd-standard) | Lower IOPS, lower cost | Cold storage, backups |
| Balanced (pd-balanced) | Good IOPS, moderate cost | General workloads |
| SSD (pd-ssd) | High IOPS, higher cost | Databases, latency-sensitive apps |
| Extreme (pd-extreme) | Highest IOPS | Mission-critical databases |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.