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 107 discussion

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

You recently migrated a monolithic application to Google Cloud by breaking it down into microservices. One of the microservices is deployed using Cloud
Functions. As you modernize the application, you make a change to the API of the service that is backward-incompatible. You need to support both existing callers who use the original API and new callers who use the new API. What should you do?

  • A. Leave the original Cloud Function as-is and deploy a second Cloud Function with the new API. Use a load balancer to distribute calls between the versions.
  • B. Leave the original Cloud Function as-is and deploy a second Cloud Function that includes only the changed API. Calls are automatically routed to the correct function.
  • C. Leave the original Cloud Function as-is and deploy a second Cloud Function with the new API. Use Cloud Endpoints to provide an API gateway that exposes a versioned API.
  • D. Re-deploy the Cloud Function after making code changes to support the new API. Requests for both versions of the API are fulfilled based on a version identifier included in the call.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
GCPCloudArchitectUser
Highly Voted 1 year, 9 months ago
Selected Answer: C
Based on the link … where it says for backward incompatible strategy use two separate deployments/instances v1 and v2 and only C option is inline with the link
upvoted 7 times
...
omermahgoub
Most Recent 11 months, 2 weeks ago
Answer is C When making backward-incompatible changes to an API, it's important to provide a way for existing callers to continue using the old API while still supporting new callers who use the new API. One way to do this is by deploying a new version of the Cloud Function that includes the new API, and leaving the old function as-is. By using Cloud Endpoints you can create an API Gateway that can handle multiple versions of the API, so that requests to different versions of the API can be routed to the corresponding Cloud Function. This allows you to maintain both versions of the API and have control over which version is exposed to the users. This approach allows you to continue supporting existing callers while also introducing new features to the application through the new version. Also, it gives you a lot more flexibility in terms of rollout, testing, and monitoring.
upvoted 1 times
...
zellck
12 months ago
Selected Answer: C
C is the answer. https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible When you make changes to your API that breaks your customers' client code, as a best practice, increment the major version number of your API. Endpoints can run more than one major version of an API concurrently. By providing both versions of the API, your customers can pick which version they want to use and control when they migrate to the new version.
upvoted 1 times
...
TNT87
1 year ago
Selected Answer: C
https://cloud.google.com/architecture/migrating-a-monolithic-app-to-microservices-gke#versioning Answer C
upvoted 2 times
...
memcache
1 year, 1 month ago
Selected Answer: D
Answer D feels more appropriate based on the below URL: https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible
upvoted 1 times
...
tomato123
1 year, 4 months ago
Selected Answer: C
C is correct
upvoted 3 times
...
scaenruy
1 year, 11 months ago
I vote D https://cloud.google.com/endpoints/docs/openapi/versioning-an-api
upvoted 2 times
Blueocean
1 year, 11 months ago
As per this link there is a reference that both versions need to be available simultaneously. I would go with Option C
upvoted 3 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 ...