Google Cloud

Core Compute — Compute Engine & MIGs

Run VMs on Google's infrastructure and scale them with Managed Instance Groups.

Compute Engine gives you VMs, with two things the other clouds do not.

A car-rental depot that lets you order a vehicle with exactly the engine and seats you want (custom machine types), keeps a fleet spread across several garages so one closing never strands you, and quietly moves you to another running car during servicing without interrupting your trip (live migration).

Key Concepts

1
Custom machine types. You pick the exact vCPU and memory rather than choosing the nearest preset:
2
    needs 6 vCPU, 20 GB
      elsewhere  -> buy 8 vCPU / 32 GB, waste the rest
      here       -> buy 6 and 20
3
Live migration. During host maintenance, a running VM is moved to another host without rebooting. Elsewhere that is a scheduled restart you have to plan around.
4
The families.
    E2   cost-optimised, general purpose
    N2   balanced, the usual default
    C2   compute optimised, high clock speed
    M    memory optimised, in-memory databases
    A, G accelerators for ML and rendering
5
Managed Instance Groups run the fleet. An instance template defines the VM; the MIG keeps a target size, autoscales, and auto-heals by recreating anything failing its health check.
6
    regional MIG   spreads across zones automatically
    zonal MIG      one zone -- a single point of failure
7
Choose regional. It is the same product and removes an entire failure mode.
8
Rolling updates are built in. Change the template and the MIG replaces instances gradually, with maxSurge and maxUnavailable controlling the pace — a canary without any extra tooling.
maxSurgemaxUnavailable
9
The discounts work differently here.
    Sustained Use    AUTOMATIC. Run most of the month, rate drops.
                     No commitment, no action.
    Committed Use    1 or 3 years, up to ~70%
    Spot VMs         up to 91% off, 30 seconds' notice before
                     reclamation
10
Sustained use being automatic is genuinely distinctive — elsewhere the equivalent saving requires a commitment up front.
11
What remains yours. The operating system, patching and the image pipeline. Picking Compute Engine over Cloud Run or GKE should be a decision about needing that control, not a default — on GCP, Cloud Run is often the better starting point.
12
What the interviewer is probing.1. "What can Compute Engine do that other clouds cannot?" Probing: the two differentiators. Stalls: "It runs VMs." Moves up: custom machine types, so you buy exactly the vCPU and memory you need, and live migration, which moves a running VM off a host during maintenance without a reboot.
13
2. "Regional or zonal MIG?" Probing: the default that matters. Stalls: "Either." Moves up: regional — it spreads instances across zones automatically, where a zonal group is a single point of failure for the same price.
14
3. "What discount applies without any commitment?" Probing: the GCP-specific lever. Stalls: "None, you must commit." Moves up: sustained use discounts apply automatically when a VM runs most of the month — elsewhere that saving requires a commitment.
15
4. "How do you do a canary with a MIG?" Probing: rolling updates. Stalls: "Deploy a second group." Moves up: change the instance template and let the MIG replace instances gradually, with maxSurge and maxUnavailable controlling the pace.