Google Cloud Platform (GCP) – Database Fundamentals

Cloud SQL

  • Google Cloud offers Cloud SQL, a fully managed relational database service for MySQL, PostgreSQL, and SQL Server.
  • It is designed to offload mundane operational tasks, meaning Google handles patching, updates, and backup management.
  • Key Features:
    • No software installation or manual maintenance required.
    • Highly scalable: Supports up to 128 processor cores, 864 GB of RAM, and 64 TB of storage.
    • Supports automatic replication scenarios, including Cloud SQL primary instances, external primary instances, and external MySQL instances.
    • The cost of an instance includes up to seven automated backups.
  • Security & Connectivity:
    • Cloud SQL encrypts customer data both in transit (within Google's internal networks) and at rest (database tables, temporary files, and backups).
    • Accessible by other Google Cloud services and external applications.
    • Integration with App Engine using standard drivers (e.g., Python).
    • Compute Engine instances can be authorized to access Cloud SQL; it is recommended to configure them in the same zone as your VM to minimize latency.
    • Supports standard tools like SQL Workbench, Toad, and other external applications using standard drivers.

Cloud Spanner

  • Cloud Spanner is a fully managed, enterprise-grade relational database service that provides horizontal scalability and strong consistency.
  • It uses standard SQL for queries and is "battle-tested" by Google’s own mission-critical services (powering multi-billion dollar businesses).
  • Ideal Use Cases:
    • Applications requiring a relational database (RDBMS) with support for JOINS and secondary indexes.
    • Scenarios demanding built-in High Availability (HA) and strong global consistency.
    • High-performance workloads requiring massive Input/Output Operations Per Second (IOPS).