Google Professional Cloud Developer Question 77
Select 3Google Cloud PlatformYou are developing a cloud-based application on Google Cloud that processes incoming requests from users worldwide. The application must gracefully handle spikes in traffic, unexpected failures in downstream services, and scaling events without impacting user experience. Which of the following strategies should you implement?
- A
Use exponential backoff when retrying failed requests to downstream services.
- B
Implement a circuit breaker pattern to avoid overwhelming failing downstream services.
- C
Scale the application only after a threshold number of user complaints regarding system capacity.
- D
Configure instance preemptions to immediately terminate any instance experiencing high CPU usage.
- E
Enable Cloud Load Balancing to distribute traffic across multiple backend instances.
Show answer and explanation
Correct answers: A, B, E
Explanation
To gracefully handle errors, disasters, and scaling events, it's crucial to implement strategies like exponential backoff to manage retries, a circuit breaker to prevent cascading failures, and Cloud Load Balancing to ensure traffic is distributed effectively. These practices ensure the application remains resilient and user experience is not impacted during high traffic, failures, or scaling events.
- A. Correct.
Using exponential backoff for retries is a recommended practice to avoid overwhelming downstream services, especially during failures or high traffic scenarios.
- B. Correct.
The circuit breaker pattern is designed to prevent cascading failures by halting requests to a failing service, allowing it time to recover.
- C. Incorrect.
Waiting for user complaints is not a proactive or scalable strategy. Applications should have automated systems to monitor and handle scaling events.
- D. Incorrect.
Terminating instances experiencing high CPU usage is not a graceful way to handle scaling or errors. Instead, scaling or optimizing workloads is more effective.
- E. Correct.
Cloud Load Balancing helps distribute traffic efficiently across multiple instances, ensuring high availability and reliability during scaling events.