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

For this question, refer to the HipLocal case study. How should HipLocal redesign their architecture to ensure that the application scales to support a large increase in users?

Full set: 265 questions
Answer options
A: Use Google Kubernetes Engine (GKE) to run the application as a microservice. Run the MySQL database on a dedicated GKE node.
B: Use multiple Compute Engine instances to run MySQL to store state information. Use a Google Cloud-managed load balancer to distribute the load between instances. Use managed instance groups for scaling.
C: Use Memorystore to store session information and CloudSQL to store state information. Use a Google Cloud-managed load balancer to distribute the load between instances. Use managed instance groups for scaling. Correct answer
D: Use a Cloud Storage bucket to serve the application as a static website, and use another Cloud Storage bucket to store user state information.
Correct Answer:
C. Use Memorystore to store session information and CloudSQL to store state information. Use a Google Cloud-managed load balancer to distribute the load between instances. Use managed instance groups for scaling.
Explanation

This option presents a robust and scalable architecture by correctly separating concerns and leveraging Google Cloud's managed services. Using a Managed Instance Group (MIG) with a load balancer allows the stateless application tier to scale horizontally based on demand. State is externalized appropriately: ephemeral session data is stored in Memorystore for low-latency access, and persistent user state is stored in Cloud SQL, a managed, scalable, and highly available relational database. This design effectively modernizes the original monolithic architecture to handle a significant increase in user traffic by allowing each component to scale independently.

Why Incorrect

A. Running a relational database like MySQL on a GKE node is an anti-pattern for production systems. It complicates management and high availability compared to using a managed service like Cloud SQL.
B. Manually configuring and managing a scalable MySQL cluster on Compute Engine instances adds significant operational overhead and complexity, which is precisely what managed services like Cloud SQL are designed to prevent.
D. Cloud Storage is an object store designed for unstructured data like files and media, not for transactional user state or session information. It lacks the performance and query capabilities of a database. ---

References

1. Cloud SQL for MySQL: Official documentation states, "Cloud SQL is a fully managed database service that makes it easy to set up, maintain, manage, and administer your relational databases on Google Cloud." This supports using Cloud SQL over a self-managed MySQL instance for scalability and reduced operational overhead.

Source: Google Cloud Documentation, "Cloud SQL for MySQL overview".

2. Memorystore for Session Management: The documentation highlights Memorystore's primary use cases, including session management. "Session management is a common use case for an in-memory database. Storing session state in Memorystore provides low latency access and is faster than using a disk-based database." This validates using Memorystore for session information.

Source: Google Cloud Documentation, "Memorystore for Redis use cases", Session management section.

3. Managed Instance Groups (MIGs) and Load Balancing: The architecture of using a load balancer with a MIG is a standard pattern for creating scalable and highly available applications. "Managed instance groups (MIGs) let you operate apps on multiple identical VMs... Cloud Load Balancing can use a MIG to serve traffic."

Source: Google Cloud Documentation, "Managed instance groups (MIGs)".

4. Stateless vs. Stateful Applications: A core principle for scalability is to make application servers stateless by externalizing state. "For an application to be scalable, it must be stateless... You can store state information in a metadata service, a cache, or an object store." This principle supports the separation of the application (on MIGs) from the state (in Cloud SQL and Memorystore).

Source: Google Cloud Architecture Framework, "Reliability pillar: Design for scalability", Design components to scale independently section.

Scroll to Top