Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 12 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 12

Single answerGoogle Cloud Platform

You are developing a microservices-based application on Google Cloud. Each microservice is responsible for a specific domain and communicates with others using REST APIs. One of the services occasionally requires data from two other microservices to fulfill a request. To ensure resilience and scalability, which approach should you choose for inter-service communication?

  1. A

    Design the service to synchronously call the two other services sequentially and aggregate the results.

  2. B

    Use a messaging system like Pub/Sub to decouple the communication between services.

  3. C

    Implement a distributed transaction system to ensure data consistency across the microservices.

  4. D

    Introduce a service mesh like Istio to manage inter-service communication.

Show answer and explanation

Correct answer: B

Explanation

In a microservices architecture, decoupling communication between services is crucial for achieving resilience and scalability. Google Cloud Pub/Sub is an excellent choice for asynchronous, event-driven communication, as it reduces the dependency between services and improves fault tolerance. While other options address different aspects of microservices, they are not directly aligned with the goal of enhancing scalability and resilience in this scenario.

  • A. Incorrect.

    This approach creates tight coupling between services and increases latency, which negatively impacts resilience and scalability.

  • B. Correct.

    Using a messaging system like Pub/Sub enables asynchronous communication, decouples microservices, and enhances scalability and fault tolerance, making it the most suitable approach.

  • C. Incorrect.

    Distributed transactions can be complex and introduce performance bottlenecks, which contradict the principles of microservices architecture.

  • D. Incorrect.

    A service mesh like Istio is useful for managing traffic, observability, and security but does not directly solve the problem of decoupling services for resilience and scalability.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam