Google Professional Cloud Developer Question 60
Select 2Google Cloud PlatformYou are developing a cloud-based e-commerce platform that uses separate microservices for inventory management, order processing, and notifications. You want to ensure that these services are loosely coupled and can handle high traffic spikes efficiently. Which combination of technologies should you use to implement asynchronous communication between these microservices?
- A
Google Cloud Pub/Sub for message delivery and Eventarc for event routing
- B
Cloud Tasks for processing long-running tasks between services
- C
Direct HTTP calls between microservices with retries for fault tolerance
- D
Apache Kafka for message streaming and persistence
- E
Firebase Realtime Database triggers for inter-service communication
Show answer and explanation
Correct answers: A, D
Explanation
For loosely coupled, asynchronous communication in a microservice architecture, you need tools that support message delivery, event routing, and scalability. Google Cloud Pub/Sub and Eventarc are native GCP solutions designed for this purpose. Similarly, Apache Kafka provides a scalable and reliable streaming solution. Direct HTTP calls and Firebase triggers are not suitable for this use case as they either introduce tight coupling or are not designed for inter-service communication.
- A. Correct.
Google Cloud Pub/Sub and Eventarc are designed for asynchronous, loosely coupled communication. Pub/Sub manages message delivery, and Eventarc routes events between services, making them ideal for microservice architectures.
- B. Incorrect.
Cloud Tasks is primarily used for managing tasks with guaranteed execution and retries, but it’s not a message broker or event routing system. It is less suitable for asynchronous communication between multiple microservices.
- C. Incorrect.
Direct HTTP calls introduce tight coupling between services and do not scale well for high traffic. They are not suitable for loosely coupled, asynchronous architectures.
- D. Correct.
Apache Kafka is a robust tool for message streaming and persistence in asynchronous systems. It is highly scalable and supports loosely coupled architectures, making it a suitable choice for this scenario.
- E. Incorrect.
Firebase Realtime Database triggers are designed for real-time updates in applications and are not intended for asynchronous communication in a microservice architecture.