Skip to content

Google Cloud Platform Overview

Google Cloud Platform (GCP) is Google's public cloud offering, built on the same infrastructure that powers Google Search, YouTube, and Gmail. While AWS leads in market share and Azure in enterprise adoption, GCP differentiates through its networking (Google's private global fiber network), data and analytics services (BigQuery, Dataflow), Kubernetes expertise (Google invented Kubernetes), and machine learning capabilities (TPUs, Vertex AI).

This overview covers GCP's architecture from first principles, how it differs from AWS/Azure, and when to choose it.


1. Why GCP Exists: Historical Context

The Origin Story

Google began offering cloud services in 2008 with App Engine — a fully managed platform for deploying web applications. Unlike AWS's IaaS-first approach (EC2 launched in 2006), Google started with PaaS. This philosophical difference persists today: GCP tends to offer higher-level abstractions and managed services.

Key milestones:

  • 2008: App Engine (PaaS)
  • 2010: Cloud Storage, BigQuery
  • 2012: Compute Engine (IaaS)
  • 2013: Cloud Datastore, Cloud SQL
  • 2014: Kubernetes open-sourced by Google
  • 2015: Google Kubernetes Engine (GKE), Cloud Pub/Sub
  • 2017: Cloud Spanner, Cloud Functions
  • 2019: Anthos (hybrid/multi-cloud), Cloud Run
  • 2021: Distributed Cloud
  • 2023: Duet AI (now Gemini for Cloud)
  • 2024: Gemini integration across all services

Why Choose GCP?

StrengthDetail
NetworkingGoogle's private global network (longest fiber network in the world)
KubernetesGKE is the most mature managed Kubernetes offering
Data/AnalyticsBigQuery, Dataflow, Pub/Sub are best-in-class
ML/AITPUs, Vertex AI, pre-trained models
PricingPer-second billing, sustained use discounts (automatic)
Open sourceKubernetes, TensorFlow, Istio, Knative — all Google-originated

2. GCP Global Infrastructure

Regions and Zones

GCP infrastructure is organized hierarchically:

As of 2026, GCP operates:

  • 40+ regions across 6 continents
  • 120+ zones (3-4 per region)
  • 187+ network edge locations (PoPs)
  • Private submarine cables (Curie, Dunant, Equiano, Grace Hopper, Firmina, Umoja, Blue, Raman)

Regions vs. Multi-Regions

ConceptDefinitionUse Case
ZoneSingle data centerIndividual VM placement
Region2-4 zones, ~1-2ms latency between zonesApplication deployment
Multi-RegionMultiple regions in a continentData replication (Cloud Storage, Spanner)
Dual-RegionSpecific pair of regionsGeo-redundant storage

Google's Network Advantage

GCP's most significant differentiator is Google's private global network. When traffic enters Google's network at a PoP (Point of Presence), it stays on Google's private fiber until it reaches the destination — it does not traverse the public internet.

Network TierLatencyCostHow It Works
Premium (default)LowerHigherTraffic enters Google's network at nearest PoP
StandardHigher25-45% cheaperTraffic uses public internet to region

3. Resource Hierarchy

GCP's resource hierarchy is fundamentally different from AWS. Where AWS uses accounts as the primary isolation boundary, GCP uses a nested Organization → Folder → Project hierarchy.

Projects: The Fundamental Unit

A GCP Project is the equivalent of an AWS account. It:

  • Contains all resources (VMs, databases, buckets, etc.)
  • Has its own billing
  • Has its own IAM policies
  • Has a globally unique Project ID (immutable)
  • Has a user-friendly Project Name (mutable)
  • Has a Project Number (auto-generated, numeric)

Comparison: GCP vs. AWS Hierarchy

GCPAWS EquivalentPurpose
OrganizationAWS OrganizationRoot entity
FolderOrganizational Unit (OU)Grouping and policy inheritance
ProjectAWS AccountResource container, billing unit
ResourceResourceIndividual service instance

Terraform Setup

hcl
# GCP resource hierarchy with Terraform
resource "google_folder" "engineering" {
  display_name = "Engineering"
  parent       = "organizations/${var.org_id}"
}

resource "google_folder" "production" {
  display_name = "Production"
  parent       = google_folder.engineering.name
}

resource "google_project" "prod_api" {
  name            = "Production API"
  project_id      = "company-prod-api"
  folder_id       = google_folder.production.name
  billing_account = var.billing_account_id

  labels = {
    environment = "production"
    team        = "platform"
  }
}

# Enable required APIs
resource "google_project_service" "apis" {
  for_each = toset([
    "compute.googleapis.com",
    "container.googleapis.com",
    "sqladmin.googleapis.com",
    "run.googleapis.com",
    "pubsub.googleapis.com",
    "cloudresourcemanager.googleapis.com",
    "iam.googleapis.com",
  ])

  project = google_project.prod_api.project_id
  service = each.value

  disable_dependent_services = false
  disable_on_destroy         = false
}

WARNING

GCP requires you to explicitly enable APIs before using them. Unlike AWS where you can immediately call any service, GCP projects start with almost all APIs disabled. Forgetting to enable an API is a common source of "Permission Denied" errors during Terraform applies.


4. GCP Networking Model

VPC: Global by Default

The biggest difference from AWS: GCP VPCs are global. A single VPC spans all regions, and subnets are regional (not zonal). This means:

  • A VM in us-central1 and a VM in europe-west1 can be in the same VPC
  • Subnets in different regions can communicate without peering
  • Firewall rules apply VPC-wide

GCP vs. AWS Networking

FeatureGCPAWS
VPC scopeGlobalRegional
Subnet scopeRegionalZonal
Cross-region communicationBuilt-in (same VPC)Requires VPC Peering or Transit Gateway
FirewallTag-based, VPC-wideSecurity Groups (instance) + NACLs (subnet)
Load balancerGlobal by defaultRegional (ALB/NLB) or Global (CloudFront)
Private Google AccessOne setting per subnetVPC Endpoints per service
DNSCloud DNS (global)Route 53 (global)

Firewall Rules

GCP firewalls are VPC-level rules that use tags and service accounts for targeting (not security groups):

hcl
# Allow HTTP from anywhere to instances with tag "web"
resource "google_compute_firewall" "allow_http" {
  name    = "allow-http"
  network = google_compute_network.main.name

  allow {
    protocol = "tcp"
    ports    = ["80", "443"]
  }

  source_ranges = ["0.0.0.0/0"]
  target_tags   = ["web"]
}

# Allow internal communication between app and database instances
resource "google_compute_firewall" "app_to_db" {
  name    = "app-to-db"
  network = google_compute_network.main.name

  allow {
    protocol = "tcp"
    ports    = ["5432"]
  }

  source_tags = ["app"]
  target_tags = ["database"]
}

# More secure: use service accounts instead of tags
resource "google_compute_firewall" "app_to_db_sa" {
  name    = "app-to-db-sa"
  network = google_compute_network.main.name

  allow {
    protocol = "tcp"
    ports    = ["5432"]
  }

  source_service_accounts = [google_service_account.app.email]
  target_service_accounts = [google_service_account.database.email]
}

5. GCP Compute Options

The Compute Spectrum

ServiceAbstraction LevelUse CasePricing Model
Compute EngineVM instancesLegacy apps, custom OSPer-second
GKE StandardManaged KubernetesComplex microservicesNode hours
GKE AutopilotServerless KubernetesK8s without node managementPod resource hours
Cloud RunServerless containersHTTP services, jobsPer-request + CPU/memory
Cloud FunctionsFunctions (FaaS)Event-driven, gluePer-invocation + duration
App EnginePaaSSimple web appsInstance hours

Comparison with AWS

GCP ServiceAWS EquivalentKey Difference
Compute EngineEC2Sustained use discounts (automatic)
GKEEKSMore mature, Autopilot mode
Cloud RunFargate + App RunnerTrue scale-to-zero, simpler
Cloud FunctionsLambdaGen2 uses Cloud Run (longer timeout)
App EngineElastic BeanstalkMore opinionated, less flexible

6. GCP Storage Options

ServiceTypeUse CaseDurability
Cloud StorageObject storageFiles, backups, data lake99.999999999% (11 nines)
Persistent DiskBlock storageVM disksRegional replication
FilestoreNFSShared file systemZonal or regional
Cloud SQLManaged RDBMSPostgreSQL, MySQL, SQL ServerMulti-zonal HA
Cloud SpannerGlobal RDBMSGlobally consistent transactionsMulti-region
FirestoreDocument DBMobile/web appsMulti-region
BigtableWide-columnIoT, time-series, analyticsZonal or regional
MemorystoreIn-memoryRedis/Memcached cachingZonal or regional
AlloyDBPostgreSQL-compatibleHigh-performance OLTPRegional

Cloud Storage Classes

ClassMonthly Cost/GBMin DurationUse Case
Standard$0.020NoneFrequently accessed
Nearline$0.01030 daysMonthly access
Coldline$0.00490 daysQuarterly access
Archive$0.0012365 daysAnnual access

7. GCP Data and Analytics

This is where GCP truly excels. Google's heritage in large-scale data processing (MapReduce, Dremel, Colossus) translates into best-in-class managed analytics services.

ServicePurposeAWS Equivalent
BigQueryServerless data warehouseRedshift Serverless
DataflowStream/batch processingKinesis Data Analytics + Glue
DataprocManaged Spark/HadoopEMR
Pub/SubMessagingSNS + SQS + Kinesis
Data FusionETL (no-code)AWS Glue Studio
ComposerManaged AirflowMWAA
LookerBI and visualizationQuickSight

BigQuery: The Killer Feature

BigQuery is GCP's most differentiated service. It is a serverless, petabyte-scale data warehouse that:

  • Requires no infrastructure management — no clusters, no nodes, no indices
  • Scans TB of data in seconds using columnar storage (Capacitor format)
  • Separates storage and compute completely
  • Offers slot-based pricing or on-demand ($5/TB scanned)
  • Supports streaming inserts (100,000 rows/second per table)
  • Has built-in ML (BigQuery ML — train models with SQL)

8. GCP vs. AWS vs. Azure: Decision Framework

Service Comparison

CategoryGCP StrengthAWS StrengthAzure Strength
KubernetesGKE (best managed K8s)Ecosystem breadthAKS + Azure Arc
ServerlessCloud Run (containers)Lambda (largest ecosystem)Azure Functions (Durable)
DatabaseSpanner (global SQL)Aurora + DynamoDBCosmos DB
AnalyticsBigQuery (serverless)Redshift + AthenaSynapse
ML/AIVertex AI + TPUsSageMaker + BedrockAzure ML + OpenAI
NetworkingGlobal VPC, global LBMost servicesExpressRoute
EnterpriseGrowingMost matureActive Directory
PricingSustained use discountsReserved InstancesReserved Instances
Free tier$300 credits + always-free12-month + always-free$200 credits + always-free

When to Choose GCP

ScenarioWhy GCP
Kubernetes-native architectureGKE is the most mature and feature-rich managed K8s
Data/analytics workloadsBigQuery, Dataflow, Pub/Sub are best-in-class
ML/AI with custom trainingTPUs provide best price/performance for training
Global applicationsGlobal VPC and global load balancing simplify multi-region
Cost-sensitive computeSustained use discounts apply automatically
Containerized workloadsCloud Run provides the simplest container deployment model

When NOT to Choose GCP

ScenarioWhy Not
Deep enterprise integrationAzure (Active Directory) or AWS (most services)
Widest service catalogAWS has 200+ services vs. GCP's ~100
Government/regulatedAWS GovCloud is most mature
Existing AWS investmentMigration cost usually not worth it
Windows workloadsAzure is native; GCP/AWS are guests

9. GCP Pricing Model

Key Pricing Differences from AWS

FeatureGCPAWS
Billing granularityPer-secondPer-second (EC2), varies by service
Automatic discountsSustained Use Discounts (up to 30%)None automatic
Committed discountsCommitted Use Discounts (1yr/3yr)Reserved Instances / Savings Plans
Preemptible/SpotSpot VMs (up to 91% off)Spot Instances (up to 90% off)
Network egressTiered (Premium vs. Standard)Single tier
Data transfer between zones$0.01/GB$0.01/GB
Data transfer between regions$0.01-0.08/GB$0.02/GB

Sustained Use Discounts

GCP automatically discounts VMs that run more than 25% of a month. No commitment required:

Monthly UsageEffective Discount
0-25%0% (full price)
25-50%~20% on incremental
50-75%~40% on incremental
75-100%~60% on incremental
Full month~30% overall
Effective Price=Pbase×(0.25+0.75×t=0.251.0d(t)0.75)

Where d(t) is the discount rate at utilization level t.


10. Getting Started: Project Setup

hcl
# terraform/gcp-foundation/main.tf
terraform {
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~> 5.0"
    }
  }
}

provider "google" {
  project = var.project_id
  region  = var.region
}

# VPC Network
resource "google_compute_network" "main" {
  name                    = "main-vpc"
  auto_create_subnetworks = false
  routing_mode            = "GLOBAL"
}

# Subnets
resource "google_compute_subnetwork" "app" {
  name          = "app-subnet"
  ip_cidr_range = "10.0.1.0/24"
  region        = var.region
  network       = google_compute_network.main.id

  secondary_ip_range {
    range_name    = "pods"
    ip_cidr_range = "10.1.0.0/16"
  }

  secondary_ip_range {
    range_name    = "services"
    ip_cidr_range = "10.2.0.0/20"
  }

  private_ip_google_access = true

  log_config {
    aggregation_interval = "INTERVAL_5_SEC"
    flow_sampling        = 0.5
    metadata             = "INCLUDE_ALL_METADATA"
  }
}

# Cloud NAT for outbound internet access
resource "google_compute_router" "main" {
  name    = "main-router"
  region  = var.region
  network = google_compute_network.main.id
}

resource "google_compute_router_nat" "main" {
  name                               = "main-nat"
  router                             = google_compute_router.main.name
  region                             = var.region
  nat_ip_allocate_option             = "AUTO_ONLY"
  source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES"

  log_config {
    enable = true
    filter = "ERRORS_ONLY"
  }
}

# Enable Private Google Access for accessing Google APIs without public IPs
# (Already enabled in subnet above with private_ip_google_access = true)

11. GCP CLI and SDK

gcloud CLI Essentials

bash
# Authentication
gcloud auth login                          # Interactive login
gcloud auth application-default login      # Set application default credentials
gcloud auth activate-service-account \
  --key-file=sa-key.json                   # Service account auth

# Project management
gcloud projects list
gcloud config set project my-project-id
gcloud config set compute/region us-central1
gcloud config set compute/zone us-central1-a

# Configurations (like AWS profiles)
gcloud config configurations create staging
gcloud config configurations activate staging

# Common operations
gcloud compute instances list
gcloud container clusters list
gcloud run services list
gcloud sql instances list

Client Libraries (TypeScript/Node.js)

typescript
// GCP client library pattern
import { Storage } from '@google-cloud/storage';
import { PubSub } from '@google-cloud/pubsub';
import { Spanner } from '@google-cloud/spanner';

// Authentication is automatic via:
// 1. GOOGLE_APPLICATION_CREDENTIALS env var
// 2. Application Default Credentials (gcloud auth application-default login)
// 3. GCE/GKE metadata server (on GCP infrastructure)
// 4. Workload Identity (recommended for GKE)

const storage = new Storage();
const pubsub = new PubSub();

async function uploadFile(bucket: string, filename: string, data: Buffer): Promise<string> {
  const file = storage.bucket(bucket).file(filename);
  await file.save(data, {
    contentType: 'application/json',
    metadata: {
      cacheControl: 'no-cache',
    },
  });
  return `gs://${bucket}/${filename}`;
}

12. Edge Cases and Common Pitfalls

API Enablement

Unlike AWS, GCP APIs must be explicitly enabled per project. Common errors:

Error: googleapi: Error 403: Cloud Run Admin API has not been used in project
123456 before or it is disabled.

Fix: Enable the API via Terraform or gcloud services enable run.googleapis.com.

Quota Management

GCP has aggressive quotas by default. Common limits that hit first:

QuotaDefaultImpact
CPUs per region24Cannot create VMs
GKE nodes per zone100Cannot scale cluster
Cloud SQL instances40Cannot create databases
External IPs8 per regionCannot assign public IPs
Pub/Sub topics10,000Unlikely to hit

Project Deletion

Deleting a GCP project is permanent after 30 days. During the 30-day window, you can restore it. After that, the project ID is permanently reserved (you can never reuse it).

DANGER

If you delete a production project, all resources — VMs, databases, storage buckets, and their data — are permanently destroyed after 30 days. There is no recovery. Always use Organization Policies to restrict who can delete projects.


See Also

"What I cannot create, I do not understand." — Richard Feynman