CLOUD-NETWORK practice question 17 of 30

You have deployed a new internal application that provides HTTP and TFTP services to on-premises hosts. You want to be able to distribute traffic across multiple Compute Engine instances, but need to ensure that clients are sticky to a particular instance across both services. Which session affinity should you choose?

Full set: 233 questions
Answer options
A: None
B: Client IP Correct answer
C: Client IP and protocol
D: Client IP, port and protocol
Correct Answer:
B. Client IP
Explanation

The requirement is to maintain session affinity for a client across two different services (HTTP/TCP and TFTP/UDP) to the same backend instance. Session affinity based on Client IP ensures that all requests from the same source IP address are directed to the same backend instance, regardless of the protocol or port used. This meets the requirement of keeping the client "sticky" across both the HTTP and TFTP services. Other affinity options are too specific and would route traffic for different protocols or ports from the same client to different backends.

Why Incorrect

A. None: This option provides no session affinity, distributing traffic based on the configured load balancing algorithm (e.g., round-robin), which fails the stickiness requirement.
C. Client IP and protocol: This would send HTTP (TCP) and TFTP (UDP) traffic from the same client to potentially different backend instances, violating the requirement.
D. Client IP, port and protocol: This is even more specific and would also fail to keep the client sticky across the two distinct services.

References

1. Google Cloud Documentation

"Internal TCP/UDP Load Balancing overview"

Session affinity. "Client IP affinity (CLIENTIP) directs requests from the same client IP address to the same backend VM... This option works for both TCP and UDP traffic."

2. Google Cloud Documentation

"Backend services overview"

Session affinity. "CLIENTIP: 2-tuple hash based on the client's IP address and the destination IP address." This confirms it does not use protocol or port

making it suitable for the scenario.

Scroll to Top