Google Associate Cloud EngineerPlanning and configuring a cloud solutionMedium
A new project requires a highly scalable and durable messaging service to decouple microservices and handle asynchronous communication. Messages must be delivered at least once, and the service needs to manage message queues without requiring server provisioning. Which Google Cloud service meets these requirements?
- AMemorystore for Redis
- BCloud Tasks
- CCloud SQL
- DCloud Pub/Sub
Show answer & explanationAnswer & explanation
Correct answer: D. Cloud Pub/Sub
Cloud Pub/Sub is a fully managed, serverless messaging service designed for asynchronous communication between services. It provides 'at-least-once' message delivery, high scalability, and durability without requiring server provisioning, making it ideal for decoupling microservices.
Why the other options are wrong
- A. Memorystore for Redis is an in-memory data store, used for caching or session management, not a durable message queue.
- B. Cloud Tasks is for managing the execution of a large number of distributed tasks, often for work queues or scheduled tasks, but not primarily for general-purpose message passing between services.
- C. Cloud SQL is a relational database, not a messaging service for asynchronous communication.
Cloud Pub/Sub
A fully managed, serverless messaging service for exchanging event data among applications and services. It supports asynchronous communication and provides at-least-once delivery.
- Serverless and fully managed
- Asynchronous messaging
- At-least-once delivery guarantee
Memory trick: MESSAGE (Messaging Type, Event Driven, Scalability, Serverless, At-least-once)