Compute Engine instances must discover and use a specific service version at startup. How should you provide the service endpoint info?
Choose an answer
Tap an option to check your answer.
Correct answer: Define the service endpoint information as metadata that is retrieved at runtime and used to connect to the desired service..
Why this is the answer
Defining service endpoint information as metadata is the recommended and most flexible approach for Compute Engine instances. Instance metadata can be dynamically updated and retrieved at runtime, allowing instances to discover and connect to the correct service version without requiring image changes or restarts. This supports agile deployments and versioning. Label data is primarily for organizing and filtering resources, not for storing dynamic configuration like service endpoints. While environment variables can store endpoint information, they are typically set during instance creation or startup scripts and are less dynamic than metadata for runtime changes. Using a fixed hostname and port and replacing the service is a less robust approach; it introduces downtime during updates and doesn't allow for concurrent old and new service versions, which is crucial for zero-downtime deployments.
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