Google Cloud Professional Cloud Developer Practice Test

Question: 1 / 400

While developing an HTTP API on Compute Engine that clients need to access, how can you provide clients with the service's IP address?

Reserve a static external IP and assign it to an HTTP(S) load balancing service's forwarding rule.

Reserve a static external IP and create an A record in Cloud DNS for client access.

Ensure clients connect using the instance name via Compute Engine internal DNS.

The correct answer focuses on ensuring clients connect using the instance name via Compute Engine internal DNS. This approach allows clients to access the HTTP API using a human-readable name instead of a numeric IP address, which can change unless otherwise configured.

Using the instance name leverages the built-in DNS capabilities of Google Cloud, which resolves private IP addresses for instances within the same Virtual Private Cloud (VPC) network. This simplifies access as clients won’t need to worry about IP address changes that might occur if the instance is restarted or if different instances are deployed. It also enhances maintainability since developers can refer to instances by name rather than constantly updating configurations that rely on IP addresses.

In contrast, while reserving a static external IP and assigning it to a load balancer is a viable option, it introduces more complexity and is not as straightforward as using internal DNS. Similarly, creating an A record in Cloud DNS may also provide a static IP, but it requires additional configuration and management, making it less convenient than simply utilizing instance names for internal access. Lastly, focusing solely on URL configurations without mentioning internal DNS misses the opportunity to leverage Google Cloud's built-in functionalities for easier and more robust access.

Get further explanation with Examzify DeepDiveBeta

Ensure clients connect using URL configurations through the API’s networking setup.

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy