Google PCD: Application Data, State and Storage Patterns — Study Guide

Part of the Google Professional Cloud Developer — Study Guide. Practice with verified answers in the Google exam hub, or take timed practice tests on ExamRoll.io.

Overview

Modern applications on Google Cloud routinely combine multiple data stores to balance latency, consistency, scalability, cost, and operational complexity. Selecting fit-for-purpose services and patterns—and understanding their failure modes—is central to resilient design. This section summarizes practical guidance for Cloud SQL, Cloud Spanner, Firestore, Bigtable, Memorystore, and Cloud Storage, and addresses migrations, partitioning, and data protection.

Relational Data on Cloud SQL

Cloud SQL provides managed MySQL, PostgreSQL, and SQL Server with familiar RDBMS semantics.

Common failure modes and mitigations:

Planet-scale Relational on Cloud Spanner

Cloud Spanner delivers horizontal scalability with global consistency options.

Trade-offs:

NoSQL Operational Stores: Firestore and Bigtable

Choose the NoSQL model that matches query patterns and throughput profile.

Caching and Object Storage Patterns

Migration, Consistency, Partitioning, and Data Protection

Practical Problem Scenario

Aurora Outfitters is migrating a monolithic ecommerce platform to Google Cloud. They must: 1) lift-and-shift MySQL to reduce risk, 2) handle 500 MB product media uploads without overloading the app, 3) scale read throughput for product catalogs, and 4) enforce per-user rate limits during peak sales.

Approach:

  1. Migrate MySQL to Cloud SQL with private IP and regional HA

    • Rationale: Private IP removes public exposure and IP allowlists, simplifying secure connectivity from GKE and Compute Engine. Regional HA protects against zonal failures; expect brief failover connection drops, so the app will implement retryable transactions and reconnect logic.
  2. Enable automated backups and PITR, and validate restore

    • Rationale: Automated backups and transaction logs enable point-in-time recovery from user or application errors. A scheduled restore to a non-production instance each week verifies that backups are usable and measures RTO.
  3. Add a read replica for catalog reads

    • Rationale: Moving catalog queries to a read replica reduces contention on the primary. The app reads from primary when write-after-read is needed (cart/checkout), and from the replica for catalog browsing, understanding replica lag trade-offs.
  4. Introduce application-side connection pooling and cap concurrency

    • Rationale: PgBouncer/HikariCP limits and reuses connections, avoiding connection storms during autoscaling and HA failovers. Pools are sized to CPU cores, not to maximum pods, preventing overload.
  5. Offload media uploads to Cloud Storage with signed URLs and resumable uploads

    • Rationale: The app issues short-lived signed URLs for clients to upload directly. Resumable uploads accommodate unreliable networks; the media service listens to Pub/Sub finalize notifications to trigger processing. Precondition headers (ifGenerationMatch) protect against overwrite races.
  6. Implement Memorystore for Redis for page caching, sessions, and rate limiting

    • Rationale: Read-through caches reduce database load for product pages with TTLs aligned to update frequency. Session data is kept ephemeral in Redis with short TTLs; application state remains in Cloud SQL. A fixed-window token strategy uses INCR/EXPIRE for per-user request caps. Cache is treated as non-authoritative; the app tolerates cache loss and repopulates on misses.
  7. Prepare a phased path to Cloud Bigtable for high-throughput catalog browse features

    • Rationale: As traffic grows, denormalized, read-optimized catalog views move to Bigtable. Row keys are designed as bucket#category#reverse_ts to distribute writes and support time-ordered listings without hotspotting.
  8. Establish schema migration and rollback procedures

    • Rationale: Migrations are additive: add columns/indexes, backfill with idempotent jobs, deploy code that reads/writes both, then remove old fields later. Feature flags guard new paths; rollback disables writes to new fields without destructive DDL.
  9. Set data lifecycle and protection policies

    • Rationale: Cloud Storage buckets use lifecycle rules to transition thumbnails to colder storage and delete outdated temporary uploads. Cloud SQL backups and Spanner/Bigtable backups (as adopted) are regularly restored for verification. Audit logs capture deletion workflows; Bigtable GC is acknowledged as asynchronous in compliance docs.
  10. Implement client and server retries with truncated exponential backoff

    • Rationale: Cloud Storage may return 429/5xx during spikes; backoff smooths load and reduces error rates. Database and cache operations use idempotency keys to ensure safe retries, particularly during failover and network blips.

This plan delivers immediate risk reduction via Cloud SQL with private connectivity and HA, keeps the app responsive and cost-efficient with caching and signed URL uploads, and builds a clear path to scale read throughput and data resilience as traffic grows.


API Design · All domains · Identity

Practice these questions → · Timed practice on ExamRoll.io →

Pass the whole exam — not just this question

You found this answer. Get every verified question and explanation in one place, and save hours of prep. Free to start.

Pass your exam →

Browse Google →

Related guides

All-in-one access

One subscription. Every exam.

Every plan unlocks unlimited answer search, practice tests, AI explanations, and the full resource library — in 20+ languages.

Monthly
24.87
Just €0.83/day
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

Best value
12 months
179.87
Just €0.49/daySave 40%
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

✓ Free plan included · ✓ Cancel anytime · ✓ All plans unlock the full product