GCP Data Services¶
Scope¶
Cloud SQL, AlloyDB, Cloud Spanner, Firestore, Bigtable, Memorystore, Database Migration Service, and Cloud SQL Auth Proxy. This file provides a concise overview of GCP database services for quick reference. For detailed coverage of each service including version-specific features, Enterprise Plus edition, and in-depth configuration guidance, see providers/gcp/database.md. For data analytics and warehousing (BigQuery, Dataflow, Dataproc), see separate data analytics guidance.
Checklist¶
- [Critical] Is Cloud SQL selected for relational workloads, with the appropriate tier and high availability configuration (regional instance with automatic failover)?
- [Critical] Are Cloud SQL instances configured with private IP only (no public IP), using Private Service Connect or private services access?
- [Critical] Is Cloud SQL configured with automated backups, point-in-time recovery, and cross-region read replicas for disaster recovery?
- [Recommended] Is Cloud Spanner evaluated for workloads requiring global strong consistency, horizontal scaling, and 99.999% availability SLA?
- [Recommended] Is Cloud Spanner node count and processing units right-sized based on read/write throughput, with autoscaler configured?
- [Recommended] Is Memorystore for Redis configured with the appropriate tier? (Basic for caching without HA, Standard for replication and failover)
- [Critical] Is Memorystore deployed with AUTH enabled, in-transit encryption, and private service access (no public IP)?
- [Optional] Is Cloud Bigtable evaluated for high-throughput, low-latency NoSQL workloads (time-series, IoT, analytics) with cluster sizing based on storage and throughput needs?
- [Recommended] Is Firestore selected for serverless document database workloads, with the appropriate mode (Native for mobile/web, Datastore for server-side)?
- [Critical] Are database connections using Cloud SQL Auth Proxy or Cloud SQL Connector libraries for secure IAM-based authentication?
- [Recommended] Is customer-managed encryption (CMEK) enabled for Cloud SQL, Spanner, and Bigtable using Cloud KMS?
- [Recommended] Are maintenance windows configured for Cloud SQL during low-traffic periods, and is the database flag configuration version-controlled?
- [Optional] Is AlloyDB evaluated for PostgreSQL workloads requiring analytical and transactional performance with columnar engine?
Why This Matters¶
GCP offers a uniquely broad database portfolio, from globally consistent Spanner to serverless Firestore. Cloud SQL differs from AWS RDS in its use of the Cloud SQL Auth Proxy for connectivity. Spanner's pricing model (per-node plus storage) requires careful capacity planning. Bigtable requires schema design expertise (row key design) to achieve performance. Choosing the wrong database type creates significant migration costs.
Common Decisions (ADR Triggers)¶
- Cloud SQL vs AlloyDB -- standard managed PostgreSQL/MySQL vs Google's enhanced PostgreSQL with columnar engine
- Cloud SQL vs Spanner -- regional relational vs globally distributed strongly consistent, cost implications
- Firestore mode -- Native mode (real-time sync, offline) vs Datastore mode (server-side, GQL queries)
- Bigtable vs Firestore -- high-throughput wide-column vs serverless document, pricing model differences
- Memorystore tier -- Basic (no HA, lower cost) vs Standard (automatic failover), Redis vs Memcached
- Cloud SQL connectivity -- Cloud SQL Auth Proxy vs private IP with VPC peering vs Cloud SQL Connector libraries
- Spanner instance sizing -- processing units (100-999) vs nodes (1000+ PUs), regional vs multi-regional configuration
Reference Architectures¶
- Google Cloud Architecture Center: Databases -- reference architectures for Cloud SQL, Spanner, Bigtable, and Firestore design patterns
- Google Cloud Architecture Framework: System design - Data -- best practices for database selection, replication, and disaster recovery
- Google Cloud: Cloud SQL high availability and disaster recovery -- reference architecture for regional HA and cross-region read replicas
- Google Cloud: Spanner reference architectures -- design patterns for globally distributed, strongly consistent database workloads
- Google Cloud: Best practices for Cloud Bigtable schema design -- reference patterns for row key design and table schema in high-throughput workloads
See Also¶
general/data.md-- general data architecture patternsgeneral/database-migration.md-- database migration strategiesproviders/gcp/storage.md-- GCP Cloud Storage and persistent disksproviders/gcp/disaster-recovery.md-- GCP cross-region DR including database failover