Google Cloud Professional Cloud Developer — Question 154

Your application is composed of a set of loosely coupled services orchestrated by code executed on Compute Engine. You want your application to easily bring up new Compute Engine instances that find and use a specific version of a service. How should this be configured?

Answer options

Correct answer: A

Explanation

Option A is correct because using metadata allows instances to dynamically retrieve the necessary endpoint information at runtime, facilitating updates to the service version. The other options do not provide the same level of flexibility, as labels and environment variables may not be as suitable for dynamic service discovery, while a fixed hostname restricts the ability to update services without additional configuration.