Google Professional Cloud Network Engineer Question 409
Select 3Google Cloud PlatformYou are designing a Google Cloud HTTP(S) Load Balancer for a web application that requires session affinity to ensure users are consistently routed to the same backend instance. The application also needs to handle dynamic traffic spikes by scaling backend instances when required. Which configuration steps should you take to meet these requirements?
- A
Enable 'Client IP' session affinity on the backend service.
- B
Set the 'Max Rate Per Instance' serving capacity limit for the backend service.
- C
Configure 'Generated Cookie' session affinity for the backend service.
- D
Set an autoscaling policy for the backend instance group.
- E
Use 'Round Robin' load balancing mode to distribute traffic evenly.
Show answer and explanation
Correct answers: A, C, D
Explanation
To meet the requirements, you need to configure session affinity and enable dynamic scaling. Session affinity can be achieved using 'Client IP' or 'Generated Cookie' methods, depending on the application's needs. Autoscaling ensures the backend instance group can handle traffic spikes by scaling up or down dynamically. Options unrelated to session affinity or scaling, such as 'Round Robin' or 'Max Rate Per Instance,' do not fully address the requirements.
- A. Correct.
Enabling 'Client IP' session affinity ensures requests from the same user (based on their IP address) are routed to the same backend instance. This is one way to achieve session affinity.
- B. Incorrect.
'Max Rate Per Instance' is not directly related to session affinity or scaling. It is used to limit the number of requests an instance can handle but doesn't address the dynamic scaling requirement.
- C. Correct.
Using 'Generated Cookie' session affinity ensures that the load balancer assigns a unique cookie to each client, enabling consistent routing to the same backend instance. This is another way to implement session affinity.
- D. Correct.
Configuring an autoscaling policy for the backend instance group allows the application to dynamically scale based on traffic spikes, meeting the requirement for handling dynamic traffic.
- E. Incorrect.
'Round Robin' distributes traffic evenly across backend instances but does not ensure session affinity or directly address dynamic scaling needs.