
Answer-first summary for fast verification
Answer: Define your service endpoint information as metadata that is retrieved at runtime and used to connect to the desired service.
The correct approach is to use metadata (Option A) because Compute Engine metadata allows dynamic configuration of service endpoints. Metadata can be set at the instance or project level, enabling new instances to retrieve the specific service version's endpoint at runtime. This is more flexible than labels (B), which are for resource organization, not runtime data. Environment variables (C) require upfront configuration and lack dynamic updates. Fixed hostnames (D) limit flexibility and require service replacement, which isn't ideal for versioning.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How should you configure your application to dynamically launch new Compute Engine instances that automatically discover and utilize a specific version of a service, given that the application consists of loosely coupled services orchestrated by Compute Engine-based code?
A
Define your service endpoint information as metadata that is retrieved at runtime and used to connect to the desired service.
B
Define your service endpoint information as label data that is retrieved at runtime and used to connect to the desired service.
C
Define your service endpoint information to be retrieved from an environment variable at runtime and used to connect to the desired service.
D
Define your service to use a fixed hostname and port to connect to the desired service. Replace the service at the endpoint with your new version.
No comments yet.