Professional Cloud Developer · Free Practice Question Medium

Question 25

The application you are creating comprises multiple microservices, each with its own RESTful API and deployed as an individual Kubernetes Service. The aim is to ensure that the consumers of the APIs are not impacted in case there are any changes to your API. Additionally, it is important to ensure that the third-party systems remain uninterrupted when new versions of the API are released.


What is the recommended way to configure the connection to the application according to Google's best practices?

  • A Use an Ingress that uses the API's URL to route requests to the appropriate backend.
  • B Combine multiple versions in the same service, and then specify the API version in the POST request.
  • C Leverage a Service Discovery system, and connect to the backend specified by the request.
  • D Use multiple clusters, and use DNS entries to route requests to separate versioned backends.
Reveal correct answer

Correct answer: A

Explanation

The recommended approach to ensure that API consumers and third-party systems are not impacted by changes to the API is to use an Ingress that routes requests to the appropriate backend based on the API's URL. An Ingress is a Kubernetes resource that acts as a reverse proxy and provides load balancing, SSL termination, and name-based virtual hosting. By using an Ingress, the API can be deployed as a separate Kubernetes Service, and the Ingress can be configured to route requests based on the API's URL, which can remain unchanged even when new versions of the API are released. This approach also allows for easy scaling of the API by adding more instances of the Service, and the Ingress can distribute the load across them.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need