Google Associate Cloud EngineerPlanning and configuring a cloud solutionMedium

A new project requires a highly scalable and durable messaging service to decouple microservices. Messages need to be delivered at least once, and subscribers should be able to pull messages. The service must handle millions of messages per second. Which Google Cloud messaging service should be chosen?

  1. ACloud Memorystore for Redis
  2. BCloud Storage
  3. CCloud Tasks
  4. DCloud Pub/Sub
Show answer & explanation

Correct answer: D. Cloud Pub/Sub

Cloud Pub/Sub is a fully managed, real-time messaging service that allows you to send and receive messages between independent applications. It is designed for high throughput, low latency, and 'at least once' delivery, making it ideal for decoupling microservices and handling millions of messages per second.

Why the other options are wrong

  • A. Cloud Memorystore for Redis is an in-memory data store for caching and low-latency data access, not a durable messaging service for microservice communication.
  • B. Cloud Storage is an object storage service and is not suitable for real-time, high-throughput message queuing or streaming.
  • C. Cloud Tasks is for asynchronous task execution and managing deferred work, not for real-time high-throughput message streaming between microservices.

Cloud Pub/Sub

A fully managed, asynchronous messaging service that decouples senders and receivers, enabling highly scalable and reliable real-time message delivery.

  • Real-time and highly scalable.
  • At least once delivery guarantee.
  • Decouples microservices and distributed systems.

Memory trick: Pub/Sub publishes messages for subscribers to pick up.

More Planning and configuring a cloud solution questions