An HTTP API runs on a Compute Engine VM and clients are in the same VPC; clients must obtain the service IP. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Ensure that clients use Compute Engine internal DNS by connecting with the internal DNS-name format instance-name.zone.c.project-id.internal..
Why this is the answer
Since both the API and clients are within the same Virtual Private Cloud (VPC), using Compute Engine's internal DNS is the most efficient and secure method for clients to discover the service. The internal DNS automatically resolves instance names to their internal IP addresses, avoiding the need for external IP addresses or public DNS records. The format instance-name.zone.c.project-id.internal is the correct way to address an instance internally. Reserving a static external IP address and using an HTTP(S) load balancer is unnecessary because the communication is internal to the VPC. This would expose the service externally, which is not required and introduces additional complexity and potential security risks. Defining an A record in Cloud DNS with an external IP also introduces external exposure and is not needed for internal VPC communication. Using a generic API-name and version-path template is not a mechanism for service discovery; it describes how clients might interact with an API once its IP or hostname is known.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed