You are developing an HTTP API hosted on a Compute Engine virtual machine instance that needs to be invoked by multiple clients within the same Virtual Private Cloud (VPC)
You want clients to be able to get the IP address of the service.
What should you do?
Click on the arrows to vote for the correct answer
A. B. C. D.D.
The best option for allowing clients within the same VPC to get the IP address of the HTTP API hosted on a Compute Engine virtual machine instance would be to:
A. Reserve a static external IP address and assign it to an HTTP(S) load balancing service's forwarding rule. Clients should use this IP address to connect to the service.
Explanation:
B. Reserve a static external IP address and assign it to an HTTP(S) load balancing service's forwarding rule. Then, define an A record in Cloud DNS. Clients should use the name of the A record to connect to the service.
Explanation:
C. Ensure that clients use Compute Engine internal DNS by connecting to the instance name with the URL https://[INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal/.
Explanation:
D. Ensure that clients use Compute Engine internal DNS by connecting to the instance name with the URL https://[API_NAME]/[API_VERSION]/.
Explanation:
In summary, the best option for allowing clients within the same VPC to get the IP address of the HTTP API hosted on a Compute Engine virtual machine instance would be to reserve a static external IP address and assign it to an HTTP(S) load balancing service's forwarding rule. Clients should use this IP address to connect to the service.