Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 147 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 147
Topic #: 1
[All Professional Cloud Developer Questions]

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?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
thewalker
2 months, 2 weeks ago
Selected Answer: A
Dynamic Discovery: Using metadata allows your Compute Engine instances to dynamically discover the endpoint information for the specific service version they need. This eliminates the need for hardcoding endpoints or relying on fixed hostnames and ports. Loose Coupling: Metadata promotes loose coupling between your services. Each service can be updated independently without affecting other services, as long as the metadata is updated accordingly. Scalability: Metadata is a scalable solution. You can easily manage and update endpoint information for a large number of services without modifying the code of each Compute Engine instance.
upvoted 1 times
thewalker
2 months, 2 weeks ago
B. Define your service endpoint information as label data that is retrieved at runtime and used to connect to the desired service: Labels are primarily used for tagging and filtering resources, not for dynamic service discovery. C. Define your service endpoint information to be retrieved from an environment variable at runtime and used to connect to the desired service: While environment variables can be used for configuration, they are not as flexible or scalable as metadata for managing service endpoints. 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: This approach is inflexible and requires manual updates to the service endpoint whenever a new version is deployed.
upvoted 1 times
...
...
alpha_canary
7 months, 2 weeks ago
Selected Answer: A
Go with A why not B? Labels are used for organizing Google Cloud resources, not for storing configuration data that your application needs to run.
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: A
The best answer is: A. Define your service endpoint information as metadata that is retrieved at runtime and used to connect to the desired service. This is the most flexible and scalable way to configure your application to easily bring up new Compute Engine instances that find and use a specific version of a service.
upvoted 1 times
...
purushi
1 year, 3 months ago
Selected Answer: A
It is either A or C. We can define a host URL as metadata in a virtual machine instance that orchestrates different services based on urls defined as metadata. One more way is to retrieve the urls from environment variables. Environment variables can be passed from, 1) command line 2) docker file 3) kubernetes deployment descriptor 4) through config server - application properities / yml file and so on. The easier way is to define it as metadata in the compute engine instance itself.
upvoted 2 times
...
TQM__9MD
1 year, 3 months ago
Selected Answer: B
I think B
upvoted 1 times
...
ryuhei
1 year, 6 months ago
Selected Answer: B
Answer is [B] .
upvoted 1 times
...
mrvergara
1 year, 9 months ago
Selected Answer: B
An example of how you can retrieve the endpoint information from a label in Python: import google.auth from google.cloud import compute # Authenticate and create a client for the Compute Engine API credentials, project = google.auth.default() compute_client = compute.Client(credentials=credentials, project=project) # Get the instance based on the instance name instance_name = "example-instance" instance = compute_client.instance(instance_name) # Get the endpoint information from the instance's labels endpoint = instance.labels.get("endpoint")
upvoted 2 times
mrvergara
1 year, 9 months ago
Ansuwer is A: Labels are used to categorize and organize resources in Google Cloud Platform, such as Compute Engine instances. While they can also be used to store endpoint information, they may not be as flexible as metadata when it comes to dynamically retrieving information at runtime. Additionally, labels are associated with individual resources, so updating the label data would require modifying the specific resource, rather than a centralized metadata store. In some cases, using labels may be more appropriate, such as when you want to categorize and organize your resources, but for managing service endpoints in a loosely coupled architecture, metadata is generally a more flexible and scalable solution.
upvoted 4 times
...
...
TNT87
1 year, 11 months ago
https://cloud.google.com/apis/design/glossary#api_service_endpoint https://cloud.google.com/compute/docs/metadata/overview Answer A Answer A
upvoted 2 times
...
zellck
1 year, 11 months ago
Selected Answer: A
A is the answer. https://cloud.google.com/service-infrastructure/docs/service-metadata/reference/rest#service-endpoint
upvoted 2 times
...
gardislan18
1 year, 11 months ago
Selected Answer: A
Correct Answer: A. best practice B - There's no label data C - harder to commit env? D - not sure about this
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...