Overview of Google Compute Engine — GCP’s IaaS offering for running virtual machines on Google’s infrastructure.


What is Google Compute Engine?

Google Compute Engine (GCE) provides virtual machines (VMs) that run on Google’s infrastructure. You get full OS-level control (Linux or Windows) and can run any workload you’d run on a physical server, with the flexibility to resize, scale, and pay per second.

GCE uses the KVM hypervisor and runs on Google’s custom Titanium platform (purpose-built hardware with custom silicon for network, storage, and security offload).

In practice: GCE is what you use when you need a traditional VM. Web servers, databases, batch processing, gaming servers, HPC workloads. If you need full control over the OS and runtime environment, start here.


GCE Architecture

flowchart TD
    subgraph Project["GCP Project"]
        subgraph VPC["VPC Network"]
            FW["Firewall Rules"]
            subgraph Zone["Zone (us-central1-a)"]
                VM1["VM Instance 1<br/>Type: e2-medium<br/>Image: Debian 12"]
                VM2["VM Instance 2<br/>Type: n2-standard-4<br/>Image: Ubuntu 24.04"]
            end
        end
        PD["Persistent Disks"]
        IP["External IPs"]
        SA["Service Account"]
    end

    VM1 --> FW
    VM2 --> FW
    VM1 --> PD
    VM2 --> PD
    VM1 --> IP
    VM2 --> SA

Key Features

FeatureDescription
Live migrationVMs are migrated to another host during maintenance without reboot. Your workload stays running.
Per-second billingCharged per second of usage with a 1-minute minimum. No hourly rounding.
Custom machine typesSpecify exact vCPU and memory instead of picking from fixed presets.
Sustained-use discountsAutomatic discounts for eligible VM resources that run a significant portion of the month. Not every machine series supports SUDs.
Committed-use discounts1- or 3-year commitments. Resource-based CUDs can reach up to 70% for memory-optimized resources and up to 55% for many other machine series; flexible CUDs trade some discount for broader usage flexibility.
Spot VMsUp to 91% off for workloads that can handle interruption. No 24-hour limit (unlike preemptible VMs).
Sole-tenant nodesRun VMs on dedicated physical hardware. Useful for licensing or compliance needs.
Shielded VMsSecure Boot, vTPM, and integrity monitoring to protect against boot-level and kernel-level attacks.
Confidential VMsData encrypted while being processed (in-use encryption), not just at rest and in transit.
Titan security chipCustom Google hardware that establishes a hardware root of trust for VM boot and identity.

GCE vs AWS EC2

AspectGCEEC2
HypervisorKVMNitro (custom)
Billing granularityPer-second (1-min minimum)Per-second (1-min minimum)
Free tier1 e2-micro VM always free (US regions)750 hours/month of t2.micro or t3.micro for 12 months
Default discountSustained-use discounts apply automatically on eligible machine series; E2 and some newer families rely on lower on-demand pricing or CUDs insteadNo equivalent automatic sustained-use discount; use Savings Plans, Reserved Instances, or Spot
Live migrationYes (transparent to VM)No (scheduled reboots during host maintenance)
Custom machine typesYes (any vCPU/memory combo)No (fixed instance types only)
Spot pricingSpot VMs (no time limit)Spot Instances (can be interrupted with 2-min warning)
Boot diskPersistent Disk (network-attached)EBS (network-attached) or Instance Store (ephemeral)

GCE’s biggest operational difference from EC2 is how much platform behavior is automatic: live migration is built in, eligible sustained-use discounts apply without a purchase workflow, and custom machine types let you right-size CPU and memory. For bigger savings, both clouds still require intentional commitment or Spot-style choices.


GCE Integration with Other GCP Services

ServiceHow It Integrates
Cloud StorageVMs can read/write GCS buckets for object storage, backups, and data exchange
Cloud Load BalancingGlobal and regional load balancers distribute traffic across VMs
Cloud Monitoring & LoggingAgent-based metrics and log collection from VMs
Cloud SQL / Cloud SpannerVMs connect to managed databases via private IP (VPC peering)
Vertex AIVMs with GPUs (A2, A3, A4, G2, G4 families) for ML training and inference
BigQueryVMs can query BigQuery via the API or use BigQuery Storage for bulk data exchange
Cloud NATProvide outbound internet access to VMs without public IPs

TL;DR

  • Google Compute Engine is GCP’s IaaS offering: virtual machines with full OS control, per-second billing, and automatic sustained-use discounts on eligible machine series.
  • Key differentiators from EC2: live migration, custom machine types, automatic sustained-use discounts on eligible series, and an always-free e2-micro VM.
  • Use GCE when you need traditional VMs. Use Cloud Run or Cloud Run functions for container/serverless workloads instead.
  • Integrates with the full GCP ecosystem (storage, databases, networking, AI/ML, monitoring).

Resources

Compute Engine Documentation Official documentation for all GCE features, machine types, and pricing.

Compute Engine Pricing Detailed pricing for all machine types, regions, and discount options.

Committed Use Discounts Current CUD models and discount behavior.

Creating Your First VM Step-by-step guide to launching a VM on GCP.

Machine Types and Images Detailed reference for machine families, naming conventions, and boot images.

VM Startup Scripts Automate VM configuration with startup scripts — metadata keys, practical examples, and best practices.

Instance Templates Create reusable VM blueprints for managed instance groups, scaling, and repeatable deployments.

Custom Images Build, version, and share golden images for fast, consistent VM deployments at scale.

High Availability, Live Migration, and Automatic Restart Understand host maintenance events, live migration, automatic restart, and Local SSD recovery behavior.

Instance Groups Managed and unmanaged instance groups — autoscaling, autohealing, rolling updates, and canary deployments.