Google Professional Cloud Network Engineer Question 485
Select 2Google Cloud PlatformYou are tasked with preventing a specific backend service in Google Cloud from being overwhelmed by a sudden spike in traffic. The backend service is behind an HTTP(S) Load Balancer. You want to limit requests to 50 requests per second per client IP. Which of the following actions should you take to configure rate limiting effectively?
- A
Create a security policy in Google Cloud Armor and set a rate-based rule with a threshold of 50 requests per second per client IP.
- B
Attach the Google Cloud Armor security policy to the backend service.
- C
Apply the rate limiting policy directly to the HTTP(S) Load Balancer frontend.
- D
Configure the backend service's instance group to reject requests exceeding 50 requests per second.
- E
Set up a custom monitoring script to track request rates and dynamically enforce limits.
Show answer and explanation
Correct answers: A, B
Explanation
To effectively configure rate limiting for a backend service, you use Google Cloud Armor security policies. By creating a rate-based rule in Google Cloud Armor, you can restrict requests based on criteria such as client IP. Attaching this security policy to the backend service via the HTTP(S) Load Balancer ensures that the rate limiting is enforced. Other methods, such as applying limits directly to the load balancer frontend or backend service, are not supported or scalable for this use case.
- A. Correct.
This is correct. Google Cloud Armor allows you to create security policies with rate-based rules to limit traffic, such as restricting each client IP to a maximum request rate.
- B. Correct.
This is correct. To enforce rate limiting, the security policy must be attached to the backend service through the HTTP(S) Load Balancer.
- C. Incorrect.
This is incorrect. Rate limiting policies are not applied directly to the frontend of the HTTP(S) Load Balancer; they are applied via security policies like those in Google Cloud Armor.
- D. Incorrect.
This is incorrect. Backend services or instance groups do not natively support request rate limiting; this functionality is implemented through Google Cloud Armor or other mechanisms.
- E. Incorrect.
This is incorrect. While custom monitoring scripts can track traffic, they do not natively enforce rate limiting in a scalable manner like Google Cloud Armor does.