Book TOC · Chapter 0 of 7 · Next: Chapter 1
Chapter 0: The PCD Reference Stack & 10 Core Principles
Chapter Focus: A visual guide to the Google Cloud Certified Professional Cloud Developer (PCD) architecture stack, how the core Google Cloud services fit together, and the 10 Core Architectural Principles that govern production design decisions.
1. The Master Architectural Map: All In-Scope Services & Tools of the Architecture Stack
The official Google Cloud Professional Cloud Developer Curriculum spans four major domains (~32% Designing Scalable/Secure/Reliable Apps, ~23% Building & Testing, ~24% Deploying to Cloud Run & GKE, and ~21% Integrating with Services, APIs & Observability). Rather than memorizing services in isolation, organize the 36 core Google Cloud services and developer tools across Six Architectural Planes:
Complete Reference Table of In-Scope PCD Services & Tools
# | Service / Tool | Architectural Plane | Primary Architectural Responsibility & Selection Trigger |
|---|---|---|---|
1 | Cloud Run (Services & Jobs) | Compute Runtime | Serverless container runtime: Services for stateless HTTP/gRPC/event endpoints (scales to zero, concurrency up to 1000, revision traffic splitting); Jobs for run-to-completion batch scripts with no HTTP listener. |
2 | Google Kubernetes Engine (GKE) | Compute Runtime | Managed Kubernetes (Autopilot for hands-off pay-per-pod management; Standard for node-level control/GPUs), workload controllers ( Deployment, StatefulSet, DaemonSet), probes, and Horizontal Pod Autoscaler (HPA). |
3 | Compute Engine & MIGs | Compute Runtime | IaaS virtual machines required for legacy lift-and-shift workloads, custom OS kernels, Windows Server registry dependencies, or non-HTTP/UDP protocols across Regional Managed Instance Groups (MIGs). |
4 | Cloud Functions (2nd Gen) & App Engine | Compute Runtime | Lightweight single-purpose event/HTTP functions built on Cloud Run/Eventarc (Cloud Functions), and PaaS web apps with built-in version traffic splitting by IP or cookie (App Engine Standard & Flexible). |
5 | Cloud Load Balancing & Cloud CDN | Edge & Traffic | Global External Application Load Balancer (Anycast IP, multi-region Serverless NEGs, URL maps, Session Affinity), Internal ALBs, Pass-Through NLBs, and edge caching via Cloud CDN. |
6 | Apigee, API Gateway & Cloud Endpoints | API Management | Apigee for full enterprise API lifecycle (monetization, developer portals, complex spike arrest/quotas, Environment Groups); Cloud API Gateway for lightweight serverless OpenAPI routing; Cloud Endpoints (ESPv2) for gRPC/REST transcoding. |
7 | Memorystore (Redis & Memcached) | Caching & State | Sub-millisecond managed in-memory store for externalizing distributed user session state, cache-aside/write-through database caching, and high-throughput leaderboards. |
8 | Cloud Pub/Sub | Messaging Fabric | Globally durable asynchronous messaging supporting 1-to-many fan-out (multiple subscriptions per topic), Push (HTTPS OIDC) vs. Pull delivery, Ordering Keys, and Dead-Letter Topics (DLTs). |
9 | Eventarc | Eventing Fabric | Standardized CloudEvents router delivering events from 130+ Google Cloud sources (via Cloud Audit Logs or direct storage/Pub/Sub sources) and custom apps to Cloud Run or GKE. |
10 | Cloud Workflows | Orchestration | Serverless stateful orchestrator that sequences multi-step HTTP/API microservice calls with conditional branching, retries, variable passing, and Saga compensation rollbacks. |
11 | Cloud Tasks & Cloud Scheduler | Orchestration | Cloud Tasks for point-to-point asynchronous task offloading with strict dispatch rate limiting ( maxDispatchesPerSecond), deduplication, and scheduled delivery times; Cloud Scheduler for recurring cron triggers. |
12 | Cloud Spanner | Relational Database | Globally distributed, horizontally scalable relational database providing external strong consistency (TrueTime), multi-region high availability (99.999%), and INTERLEAVE IN PARENT co-located tables. |
13 | AlloyDB for PostgreSQL | Relational Database | High-performance enterprise PostgreSQL with disaggregated storage, instant regional failover, and a built-in columnar engine for hybrid transactional/analytical processing (HTAP). |
14 | Cloud SQL | Relational Database | Fully managed regional PostgreSQL, MySQL, and SQL Server with High Availability (regional synchronous standby), cross-region read replicas (eventual consistency), and Cloud SQL Auth Proxy. |
15 | Cloud Firestore | NoSQL Document DB | Serverless document database with strong global consistency, real-time client listeners, offline mobile/web sync, and composite indexing. |
16 | Cloud Bigtable | NoSQL Wide-Column | Petabyte-scale, sub-10ms wide-column store for IoT telemetry, time-series, and financial ticks; performance governed by single-indexed row-key design and multi-cluster app profiles. |
17 | Cloud Storage | Object Storage | Strongly consistent global object storage supporting Signed URLs (time-limited delegated access), Object Lifecycle Management (storage class transitions/deletion), and Retention Policies / Bucket Locks (WORM compliance). |
18 | BigQuery | Analytics & AI/ML | Serverless enterprise data warehouse receiving high-throughput streaming inserts via the BigQuery Storage Write API or zero-code Pub/Sub BigQuery Subscriptions. |
19 | IAM & Service Accounts | Security & Identity | Enforcing Least Privilege via dedicated per-service runtime Service Accounts, predefined/custom IAM roles, Application Default Credentials (ADC), and Service Account Impersonation. |
20 | Workload Identity Federation (WIF) | Security & Identity | Keyless authentication allowing GKE Pods (Workload Identity for GKE) and external CI/CD or multi-cloud workloads (GitHub Actions, AWS, Azure) to exchange OIDC/SAML tokens for short-lived Google Cloud tokens. |
21 | Secret Manager & Cloud KMS | Security & Crypto | Secret Manager for storing, versioning, mounting, and rotating application secrets (DB passwords, API keys, TLS certs); Cloud KMS for managing cryptographic keys (CMEK, envelope encryption, digital signatures). |
22 | IAP & Web Security Scanner | App Security | Identity-Aware Proxy (IAP) for BeyondCorp zero-trust context-aware access to web apps without VPNs; Web Security Scanner for automated DAST crawling of OWASP vulnerabilities. |
23 | Artifact Analysis & Security Command Center | Vulnerability Mgmt | Automated container CVE scanning on push to Artifact Registry (Artifact Analysis) and centralized posture/threat detection across Google Cloud (Security Command Center). |
24 | Binary Authorization | Supply Chain Security | Deploy-time admission control on Cloud Run and GKE that blocks any container image lacking cryptographic attestations from trusted Cloud Build pipelines (always reference by @sha256 digest). |
25 | Cloud Service Mesh, NetworkPolicy & VPC Egress | Network Security | Cloud Service Mesh for zero-code mutual TLS (mTLS) and L7 traffic policies; Kubernetes NetworkPolicy for L3/L4 pod-to-pod firewalls; Direct VPC Egress / Serverless VPC Access and Private Service Connect for private networking. |
26 | Google Cloud CLI ( gcloud) & Emulators | Local Development | Local service emulators ( pubsub, firestore, bigtable, spanner, datastore) and --impersonate-service-account for fast, zero-cost offline unit and integration testing. |
27 | Cloud Workstations, Cloud Shell & Cloud Code | Developer IDE | Cloud Workstations for VPC-isolated, container-standardized remote IDEs; Cloud Shell for browser CLI with 5 GB $HOME; Cloud Code for Skaffold-powered IDE build/debug loops and MCP server integrations. |
28 | Gemini Code Assist & Gemini Cloud Assist | AI Developer Tools | Gemini Code Assist for in-IDE code generation, refactoring, context engineering, and automated unit test authoring; Gemini Cloud Assist for natural-language root-cause analysis in Cloud Logging/Observability. |
29 | Cloud Build & Artifact Registry | Build & Packaging | Serverless CI/CD pipeline ( cloudbuild.yaml) executing parallel unit/integration test steps, Google Cloud Buildpacks, Kaniko layer caching, SLSA provenance generation, and multi-format storage in Artifact Registry. |
30 | Cloud Client Libraries, REST & gRPC | API Consumption | Idiomatic Cloud Client Libraries supporting connection pooling, Batching, Field Masks ( fields), Pagination (pageToken), HTTP Caching (ETag), and Truncated Exponential Backoff with Jitter. |
31 | Cloud Logging, Monitoring, Trace, Error Reporting & Profiler | Observability Suite | Structured JSON logs on stdout/stderr, OpenTelemetry instrumentation, W3C traceparent / X-Cloud-Trace-Context correlation, Error Reporting stack-trace grouping, and low-overhead Cloud Profiler flame graphs. |
2. The 10 Core Architectural Principles of the Architecture Stack
Whenever you are torn between two plausible-sounding options In Google Cloud architectures, apply these 10 Core Architectural Principles—they eliminate over 80% of look-alike service comparisons immediately:
- Principle 1 — Never Export Static Service Account JSON Keys: Any option that downloads a
.jsonservice account key file—whether for a local laptop, a GKE Pod, a Compute Engine VM, or a GitHub Actions pipeline—is almost always a trap. Use Application Default Credentials (ADC) with--impersonate-service-accountlocally, GKE Workload Identity for Pods, attached Service Accounts for Cloud Run/GCE, and Workload Identity Federation (WIF) for external CI/CD or multi-cloud workloads. - Principle 2 — Stateless Compute Demands Externalized State &
stdoutLogging: Cloud Run instances and GKE Pods are ephemeral. Never write session state or application logs to the local container disk (/var/log). Externalize user session data to Memorystore for Redis or Firestore, store files in Cloud Storage (using Signed URLs for direct client uploads/downloads), and emit structured JSON logs tostdoutandstderrwith thelogging.googleapis.com/tracefield. - Principle 3 — Match the Async Tool to the Control Model (
Pub/Subvs.Cloud Tasksvs.Workflowsvs.Eventarc): - Need 1-to-many fan-out decoupling where the publisher does not know the subscribers? → Cloud Pub/Sub.
- Need rate-limited dispatch (
maxDispatchesPerSecond) or scheduled delivery to protect a fragile downstream API/DB? → Cloud Tasks. - Need stateful step-by-step orchestration with conditional branching and Saga compensation rollbacks? → Cloud Workflows.
- Need standardized CloudEvents routing from 130+ Google Cloud services (Audit Logs/GCS) to Cloud Run/GKE? → Eventarc.
- Principle 4 — Tune Cloud Run Concurrency & Minimum Instances to the Runtime: Cloud Run defaults to concurrency
80. If a container runs a single-threaded CPU-bound process or heavy memory workload per request, lower--concurrency(down to1if necessary) so Cloud Run scales out instances instead of blocking the event loop. To eliminate cold-start latency on latency-sensitive APIs, configure--min-instances(and enable Startup CPU Boost for slow JVM/CLR initialization). - Principle 5 — Separate the Three Kubernetes Probes by Lifecycle Phase:
startupProbe: Protects slow-starting legacy/Java containers from premature termination during initial boot.readinessProbe: Controls traffic routing—if a dependency is temporarily overloaded or the pod is warming caches, failingreadinessProberemoves the Pod IP from the Service load balancer without restarting the container.livenessProbe: Detects deadlocks—failinglivenessProbekills and restarts the container. Never check external databases in alivenessProbe, or a transient DB blip will trigger a cascading restart storm across your entire cluster!- Principle 6 — Prevent Hotspots in Distributed Databases (
Spanner,Bigtable,Firestore): Never use monotonically increasing integers (AUTO_INCREMENT), raw timestamps as the row-key prefix, or sequential document IDs at high write rates—they route 100% of writes to a single storage split/tablet. Use UUIDv4, hash-prefixed keys, or bit-reversed sequences in Cloud Spanner; useMetricType#ReverseTimestampor salted prefixes in Cloud Bigtable; and use auto-generated random IDs in Firestore. - Principle 7 — Manage Database Connections Carefully from Serverless Compute: When Cloud Run or Cloud Functions scales out to 500 instances during a traffic spike, opening a new database connection per request will instantly exhaust
max_connectionson Cloud SQL or AlloyDB. Always initialize your connection pool in global scope (outside the request handler), bound the pool size per instance, and connect securely via the Cloud SQL Auth Proxy / AlloyDB Auth Proxy or Direct VPC Egress. - Principle 8 — Secret Manager Stores Application Secrets; Cloud KMS Manages Cryptographic Keys: Never store database passwords, OAuth client secrets, or third-party API keys directly in Cloud KMS or plaintext
cloudbuild.yaml/ DockerfileENVinstructions. Store them in Secret Manager, grantroles/secretmanager.secretAccessorto the runtime service account, and reference the pinned secret version via native Cloud Run volume mounts/env vars or the Secret Manager API. - Principle 9 — Enforce Supply Chain Integrity from Build to Runtime (
Cloud Build→Artifact Analysis→Binary Authorization): Build images from source using multi-stage Dockerfiles or Google Cloud Buildpacks, scan automatically on push with Artifact Analysis, verify vulnerability counts in yourcloudbuild.yamlpipeline before creating a cryptographic Attestation, and enforce Binary Authorization on GKE/Cloud Run using immutable@sha256image digests (never mutable:latesttags). - Principle 10 — Consume APIs Defensively (
Field Masks,Page Tokens,Batching, andExponential Backoff with Jitter): When calling Google Cloud or REST/gRPC APIs, restrict payload bandwidth using thefieldsparameter (FieldMask), traverse large collections withpageToken/pageSize(never unboundedOFFSET), consolidate small calls via Batching, and handle transient429 Too Many Requestsor503 Service Unavailableerrors using Truncated Exponential Backoff with Randomized Jitter to prevent thundering herds.
Book TOC · Chapter 0 of 7 · Next: Chapter 1
AwesomeGCP.com Learning
The approach taken is a question-led learning approach: you explore realistic project scenarios where you need to make decisions or take actions to achieve business goals within specific constraints. Instead of passive learning, you are challenged to think and work through the options to master the Professional Cloud Developer (PCD) certification!