GOOGLE-PROFESSIONAL-CLOUD-DEVELOPER practice question 29 of 35

In order for HipLocal to store application state and meet their stated business requirements, which database service should they migrate to?

Full set: 265 questions
Answer options
A: Cloud Spanner
B: Cloud Datastore
C: Cloud Memorystore as a cache
D: Separate Cloud SQL clusters for each region Correct answer
Correct Answer:
D. Separate Cloud SQL clusters for each region
Explanation

Using separate Cloud SQL clusters for each region is the optimal solution for an application that requires a relational data model and is deployed globally to serve users with low latency. This architecture supports data residency requirements, ensuring that data for users in a specific geography is stored within that region. It is the best fit when the application is designed to operate on a regionally sharded dataset and does not require strong, synchronous transactional consistency across different geographic regions. This pattern is common for migrating existing applications that already use a regional database architecture.

Why Incorrect

A. Cloud Spanner is a globally distributed, strongly consistent database. It is unsuitable if strict data residency is a requirement or if global transactional consistency is not needed, making it overly complex.
B. Cloud Datastore is a NoSQL document database. It is inappropriate for applications that are built on a relational schema and rely on complex SQL queries and transactions.
C. Cloud Memorystore as a cache is an in-memory data store for caching, not a durable, persistent database for primary application state. It complements a database but cannot replace it. ---

References

1. Google Cloud Documentation, "Choosing a storage option": This guide compares database services. It positions Cloud SQL for "Relational database needs for web frameworks, and existing applications like WordPress and Drupal" and highlights its regional nature. In contrast, it describes Cloud Spanner for "Mission-critical applications that need strong consistency at a global scale." This distinction supports choosing Cloud SQL for regional needs. (See the comparison table under "Choose a database").

2. Google Cloud Documentation, "Cloud SQL locations": "You can configure your Cloud SQL instance to store data in a specific region... To reduce latency and increase availability, store your data close to the services that need it." This directly supports the rationale for using regional Cloud SQL clusters to improve performance for a geographically distributed user base.

3. Google Cloud Architecture Center, "Application modernization to Google Cloud: Migration patterns": This document discusses migration strategies. The pattern of migrating an on-premises relational database to Cloud SQL is a common approach, and extending this to a multi-region setup with separate clusters is a logical step for global applications not requiring Spanner's specific features. (See section "Migrate to managed services").

4. Google Cloud Documentation, "Cloud Spanner overview": "Cloud Spanner is the only enterprise-grade, globally-distributed, and strongly-consistent database service...". This official description clarifies that Spanner's primary use case is for applications requiring these specific global capabilities, which are not implied as necessary for HipLocal's scenario, making a regional solution more appropriate.

Scroll to Top