Google Professional Cloud Developer Question 76
Select 3Google Cloud PlatformYour application is deployed on Google Kubernetes Engine (GKE) and handles high traffic during holiday sales. Recently, the application has been experiencing downtime during scaling events due to request timeouts and database connection errors. You want to ensure graceful error handling and scaling to minimize service disruptions. What steps should you take to address this issue?
- A
Implement exponential backoff for retries in your application when calling external services.
- B
Configure Kubernetes readiness and liveness probes for your application pods.
- C
Increase the timeout threshold for all API requests to handle traffic spikes.
- D
Implement a circuit breaker pattern in your application to prevent cascading failures.
- E
Use preemptible VMs for your database to save costs during scaling events.
Show answer and explanation
Correct answers: A, B, D
Explanation
To handle errors, disasters, and scaling events gracefully, it's important to implement retry mechanisms with exponential backoff to reduce retry storms, configure probes to ensure only healthy pods handle traffic, and apply resilience patterns like circuit breakers to isolate failing components. These approaches collectively improve the reliability and resilience of your application during high traffic and scaling events. Avoid solutions that compromise stability, such as preemptible VMs for critical components or excessively increasing timeouts.
- A. Correct.
Implementing exponential backoff ensures that retries for failed requests are spaced out progressively, reducing the load on external services and improving fault tolerance during scaling events.
- B. Correct.
Readiness and liveness probes ensure that only healthy application pods are routed traffic, preventing downtime caused by unready or failing pods during scaling events.
- C. Incorrect.
Increasing the timeout threshold for all API requests is not a recommended approach as it can lead to excessive delays for users and does not solve the root cause of scaling or connection issues.
- D. Correct.
The circuit breaker pattern helps prevent cascading failures by halting requests to failing dependencies, improving the overall resilience of your application during scaling events.
- E. Incorrect.
Using preemptible VMs for your database is not suitable for production-grade reliability, as they can be terminated at any time, increasing the risk of downtime during critical scaling events.