Google Professional Cloud Developer Question 3
Select 3Google Cloud PlatformYou are designing an API to serve a high-traffic e-commerce platform hosted on Google Cloud. The API must handle sudden spikes in traffic during flash sales, provide low latency responses, and ensure high availability. Which of the following design choices will best meet these requirements?
- A
Use Cloud Load Balancing to distribute incoming traffic across multiple instances.
- B
Implement a caching layer using Memorystore to store frequently accessed data.
- C
Use a single Compute Engine instance with high CPU and memory to handle all API requests.
- D
Enable autoscaling for your backend services based on CPU utilization and request rates.
- E
Design the API to include synchronous, blocking calls for all client requests.
Show answer and explanation
Correct answers: A, B, D
Explanation
To design a high-performing API for a high-traffic platform, you need to implement scalable and resilient architecture. Using Cloud Load Balancing, caching with Memorystore, and autoscaling ensures the API can handle traffic spikes, reduce latency, and provide high availability. Avoiding single points of failure and synchronous calls further enhances performance and reliability.
- A. Correct.
Using Cloud Load Balancing ensures that incoming traffic is distributed efficiently across multiple instances, improving availability and performance during traffic spikes.
- B. Correct.
Adding a caching layer like Memorystore helps reduce load on backend services by serving frequently accessed data quickly, which reduces latency and improves response times.
- C. Incorrect.
Using a single Compute Engine instance creates a single point of failure and does not scale effectively to handle sudden traffic spikes.
- D. Correct.
Enabling autoscaling ensures that your backend services can dynamically adjust to increases in traffic, maintaining high availability and performance.
- E. Incorrect.
Synchronous, blocking calls can lead to higher latency and reduced scalability during high traffic, making it unsuitable for this scenario.