Google Professional Cloud Network Engineer Question 430
Single answerGoogle Cloud PlatformYou are designing a Google Cloud solution where you need to forward TCP traffic from a public IP address to a managed instance group running a custom application on port 8080. You want to ensure that the traffic is routed properly without using a load balancer. How can you achieve this?
- A
Configure a TCP load balancer and set up a backend service to route traffic to the instance group.
- B
Use protocol forwarding with a forwarding rule that points to a target instance configured with the correct port.
- C
Create a firewall rule to allow TCP traffic on port 8080 and assign the public IP to the instance group.
- D
Deploy a Cloud NAT gateway to forward traffic to the instance group.
Show answer and explanation
Correct answer: B
Explanation
Protocol forwarding is the appropriate solution when you need to forward traffic from a public IP address to instances or instance groups on a specific port without using a load balancer. A forwarding rule in combination with a target instance or target pool is configured to handle the traffic. This method is simpler and more cost-effective for scenarios where load balancing features are not required.
- A. Incorrect.
This option is incorrect because a TCP load balancer is not required for forwarding traffic in this scenario. Protocol forwarding can achieve the same result without the complexity of a load balancer.
- B. Correct.
This option is correct because protocol forwarding allows you to forward traffic from a public IP address to a target instance or target pool on a specific port, which matches the requirements of this scenario.
- C. Incorrect.
This option is incorrect because a firewall rule only permits or denies traffic; it does not forward traffic to an instance group. A forwarding rule is necessary for forwarding traffic.
- D. Incorrect.
This option is incorrect because Cloud NAT is designed for outbound internet connectivity for private instances, not for forwarding inbound traffic to a specific port.