Google Cloud architecture diagrams

GKE, Cloud Run, BigQuery: the shapes GCP actually gets used in.

Google Cloud architectures drawn with the official product icons. The value of an icon set here is not decoration, it is that a reviewer can tell Cloud Run from GKE at a glance, and those two choices have very different operational costs.

GCP's service names change less often than its competitors' do, which makes these diagrams age better than most cloud drawings.

When to use these

When not to

Common mistakes

The common mistake is drawing every managed service as a box of the same size, which hides that one of them is the entire data plane and the rest are configuration. Size and grouping should say something.

The 6 templates

Simple Architecture.puml

Load balancer, compute, database. The shape most projects start as.

Simple Architecture: rendered example
Show the source
@startuml
!include <gcp/GCPCommon>
!include <gcp/cloud_load_balancing>
!include <gcp/compute_engine>
!include <gcp/cloud_sql>
!include <gcp/cloud_storage>

title GCP — Simple architecture

left to right direction

GCP_CLOUD_LOAD_BALANCING(lb, "Load Balancer", "global HTTPS")
GCP_COMPUTE_ENGINE(vm, "Compute Engine", "e2-standard-4")
GCP_CLOUD_SQL(db, "Cloud SQL", "PostgreSQL 15")
GCP_CLOUD_STORAGE(gcs, "Cloud Storage", "static assets")

lb --> vm
vm --> db
vm --> gcs
@enduml

Notes and a copy button for this template

VPC Networking.puml

DNS, CDN and the network edge. Draw this when latency or egress is the question.

VPC Networking: rendered example
Show the source
@startuml
!include <gcp/GCPCommon>
!include <gcp/cloud_dns>
!include <gcp/cloud_cdn>
!include <gcp/cloud_armor>
!include <gcp/cloud_load_balancing>
!include <gcp/virtual_private_cloud>
!include <gcp/compute_engine>
!include <gcp/cloud_nat>

title GCP — VPC networking

left to right direction

GCP_CLOUD_DNS(dns, "Cloud DNS")
GCP_CLOUD_CDN(cdn, "Cloud CDN")
GCP_CLOUD_ARMOR(armor, "Cloud Armor", "WAF policies")
GCP_CLOUD_LOAD_BALANCING(lb, "Load Balancer")
GCP_VIRTUAL_PRIVATE_CLOUD(vpc, "VPC", "10.0.0.0/16")
GCP_COMPUTE_ENGINE(vm, "Instance group", "autoscaled")
GCP_CLOUD_NAT(nat, "Cloud NAT", "egress only")

dns --> cdn
cdn --> armor

The rest of this template, and how to use it

Serverless Architecture.puml

API Gateway and Cloud Run. Scales to zero, which is the whole argument.

Serverless Architecture: rendered example
Show the source
@startuml
!include <gcp/GCPCommon>
!include <gcp/cloud_api_gateway>
!include <gcp/cloud_run>
!include <gcp/cloud_functions>
!include <gcp/pubsub>
!include <gcp/firestore>
!include <gcp/cloud_scheduler>

title GCP — Serverless architecture

left to right direction

GCP_CLOUD_API_GATEWAY(gw, "API Gateway")
GCP_CLOUD_RUN(run, "Cloud Run", "container service")
GCP_PUBSUB(ps, "Pub/Sub", "events")
GCP_CLOUD_FUNCTIONS(fn, "Cloud Functions", "handler")
GCP_FIRESTORE(fs, "Firestore", "documents")
GCP_CLOUD_SCHEDULER(sched, "Cloud Scheduler", "cron")

gw --> run
run --> ps
ps --> fn
fn --> fs

The rest of this template, and how to use it

Microservices (GKE).puml

GKE with a load balancer in front. The heavier option, and sometimes the right one.

Microservices (GKE): rendered example
Show the source
@startuml
!include <gcp/GCPCommon>
!include <gcp/cloud_load_balancing>
!include <gcp/google_kubernetes_engine>
!include <gcp/artifact_registry>
!include <gcp/pubsub>
!include <gcp/cloud_spanner>
!include <gcp/memorystore>

title GCP — Microservices on GKE

left to right direction

GCP_CLOUD_LOAD_BALANCING(lb, "Load Balancer")
GCP_GOOGLE_KUBERNETES_ENGINE(gke, "GKE", "regional cluster")
GCP_ARTIFACT_REGISTRY(ar, "Artifact Registry", "images")
GCP_PUBSUB(ps, "Pub/Sub", "service events")
GCP_CLOUD_SPANNER(sp, "Cloud Spanner", "global SQL")
GCP_MEMORYSTORE(ms, "Memorystore", "Redis cache")

lb --> gke
ar ..> gke
gke --> ps
gke --> sp

The rest of this template, and how to use it

Data Platform.puml

Pub/Sub into Dataflow. The pipeline shape, where ordering and replay matter.

Data Platform: rendered example
Show the source
@startuml
!include <gcp/GCPCommon>
!include <gcp/pubsub>
!include <gcp/dataflow>
!include <gcp/cloud_storage>
!include <gcp/bigquery>

title GCP — Data platform

left to right direction

GCP_PUBSUB(ps, "Pub/Sub", "ingest")
GCP_DATAFLOW(df, "Dataflow", "streaming ETL")
GCP_CLOUD_STORAGE(gcs, "Cloud Storage", "raw landing zone")
GCP_BIGQUERY(bq, "BigQuery", "warehouse")

ps --> df
df --> gcs
df --> bq
gcs --> bq
@enduml

Notes and a copy button for this template

CI/CD Pipeline.puml

Cloud Build and Artifact Registry. The path from commit to running service.

CI/CD Pipeline: rendered example
Show the source
@startuml
!include <gcp/GCPCommon>
!include <gcp/cloud_build>
!include <gcp/artifact_registry>
!include <gcp/cloud_run>
!include <gcp/secret_manager>
!include <gcp/cloud_logging>

title GCP — CI/CD pipeline

left to right direction

GCP_CLOUD_BUILD(build, "Cloud Build", "on push")
GCP_ARTIFACT_REGISTRY(ar, "Artifact Registry")
GCP_CLOUD_RUN(run, "Cloud Run", "deploy target")
GCP_SECRET_MANAGER(sm, "Secret Manager")
GCP_CLOUD_LOGGING(log, "Cloud Logging")

build --> ar
ar --> run
sm ..> run
run --> log
@enduml

Notes and a copy button for this template

Render these offline

Every template here ships in Gnomon and renders on your machine, with no account and nothing sent to a server. The browser editor is free and needs no install.

Get GnomonOpen the browser editor