To support both existing and new callers of an API in a Cloud Function after a backward-incompatible change, what should be done?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Prepare for the Google Cloud Professional Cloud Developer Test. Benefit from mock assessments featuring flashcards and multiple-choice format, each furnished with hints and detailed explanations. Excel in your exam with confidence!

Deploying a second Cloud Function with the new API while keeping the original function allows you to support both existing users and new users seamlessly. This approach ensures backward compatibility, as existing callers of your API can continue to use the original function without disruption. New callers can use the newly deployed function that includes the changes.

Additionally, using Cloud Endpoints for API management enables you to document and manage both versions of your API effectively. Cloud Endpoints provides features such as monitoring, authentication, and scalability, which enhance the overall API experience. By maintaining two distinct functions, you can gradually transition users to the new version and handle any necessary updates or deprecations in a controlled manner.

In contrast, deploying a second Cloud Function that only includes the changed API does not allow for both versions to coexist, potentially disrupting existing callers. Using a load balancer to handle traffic to a second function adds unnecessary complexity and does not inherently address the need to support both API versions. Finally, simply re-deploying the existing Cloud Function with versioning may break existing functionality for current users, making it a less viable option.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy