
Answer-first summary for fast verification
Answer: 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/.
The question requires a solution for clients within the same VPC to resolve the IP address of a Compute Engine-hosted HTTP API. Option C is correct because it leverages Compute Engine's internal DNS, which dynamically resolves the instance's current internal IP address. This method is efficient and avoids unnecessary external traffic, making it the optimal choice for internal clients. Options A and B involve external IP addresses and load balancers, which are not necessary for internal communication within the same VPC. Option D does not provide a valid method for resolving the IP address of the service.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are developing an HTTP API hosted on a Compute Engine VM instance that needs to be called by multiple clients within the same VPC. The clients need to discover the service's IP address.
What should you do?
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.
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.
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/.
D
Ensure that clients use Compute Engine internal DNS by connecting to the instance name with the url https://[API_NAME]/[API_VERSION]/.
No comments yet.