Google Professional Cloud Network Engineer Question 406
Select 3Google Cloud PlatformYour organization uses a Google Cloud HTTP(S) Load Balancer to distribute traffic to a group of backend instances. The application is stateful and requires that subsequent requests from the same client are sent to the same backend instance. Additionally, the application experiences high traffic spikes, and you need to ensure the load balancer can scale to handle increased demand without dropping connections. What configuration changes should you implement to meet these requirements?
- A
Enable client IP-based session affinity on the backend service.
- B
Set the maximum serving capacity for each backend instance to a fixed value.
- C
Enable generated cookie-based session affinity on the backend service.
- D
Configure the backend service with an autoscaling policy based on CPU utilization.
- E
Disable connection draining on the backend service.
Show answer and explanation
Correct answers: A, C, D
Explanation
To ensure stateful behavior, you need to configure session affinity, either by client IP or generated cookies, depending on your application's requirements. To handle traffic spikes, enabling autoscaling ensures that the backend instances can dynamically adjust to increased demand. These configurations together allow the load balancer to meet both the stateful requirement and the need to scale during high traffic periods.
- A. Correct.
Client IP-based session affinity ensures that requests from the same client IP are sent to the same backend. This is suitable for stateful applications.
- B. Incorrect.
Setting a fixed maximum serving capacity can limit scalability during traffic spikes, which could result in dropped connections.
- C. Correct.
Generated cookie-based session affinity can also ensure stateful behavior by binding a user session to a specific backend using cookies.
- D. Correct.
Autoscaling based on CPU utilization allows the backend instances to scale dynamically during traffic spikes, ensuring the load balancer can handle increased demand.
- E. Incorrect.
Disabling connection draining is not recommended as it can disrupt in-flight requests during backend shutdowns or changes.