Topic 1 Question 180
You are designing an application that consists of several microservices. Each microservice has its own RESTful API and will be deployed as a separate Kubernetes Service. You want to ensure that the consumers of these APIs aren't impacted when there is a change to your API, and also ensure that third-party systems aren't interrupted when new versions of the API are released. How should you configure the connection to the application following Google-recommended best practices?
Use an Ingress that uses the API's URL to route requests to the appropriate backend.
Leverage a Service Discovery system, and connect to the backend specified by the request.
Use multiple clusters, and use DNS entries to route requests to separate versioned backends.
Combine multiple versions in the same service, and then specify the API version in the POST request.
ユーザの投票
コメント(3)
- 正解だと思う選択肢: A
B,C, and D can be eliminated
B. Service discovery only works within the cluster itself, so external clients can't use it C. Using multiple clusters is an overkill, you can deploy multiple version of the same service within a single cluster D. Passing the API version in the request body is not a REST best practice
The best practice is to pass the version of the API in the the URL path, e.g /v1/foo, /v2/foo Using this approach, you can route requests to the appropriate backend service within the GKE cluster using an Ingress resource, which is option A.
👍 3micoams2022/12/18 - 正解だと思う選択肢: A👍 3TNT872022/12/21
- 正解だと思う選択肢: D
D is the answer.
👍 2zellck2022/12/15
シャッフルモード