Professional Data EngineerDesigning data processing systemsEasy
A startup is building a new mobile application that generates user activity logs. They expect millions of users, leading to a high volume of events (hundreds of thousands per second) that need to be captured reliably and immediately. The events will then be processed by downstream analytics systems. The solution must be fully managed, highly scalable, and provide at-least-once delivery guarantees. Which Google Cloud service is the most appropriate for ingesting these high-volume event streams?
- ACloud Functions
- BCloud SQL
- CCloud Pub/Sub
- DCloud Logging
Show answer & explanationAnswer & explanation
Correct answer: C. Cloud Pub/Sub
Cloud Pub/Sub is a fully managed, asynchronous messaging service designed for scalable and reliable event ingestion. It guarantees at-least-once message delivery and can handle hundreds of thousands of events per second, making it perfectly suited for high-volume, real-time stream ingestion for downstream processing.
Why the other options are wrong
- A. Cloud Functions are for executing small, single-purpose code snippets in response to events, not for acting as a high-throughput messaging bus.
- B. Cloud SQL is a relational database, not designed for the high-throughput, low-latency ingestion of millions of unstructured event streams per second.
- D. Cloud Logging is primarily for collecting and storing operational logs from applications and Google Cloud services, not for general-purpose high-volume event streaming for custom analytics.
Cloud Pub/Sub for Event Ingestion
A highly scalable and reliable messaging service used to ingest large volumes of real-time event data from various sources for subsequent processing.
- Fully managed and asynchronous.
- Guarantees at-least-once delivery.
- Scales to millions of events/second.
- Ideal for decoupling producers from consumers.
Memory trick: Pub/Sub: Publish events, Subscribe to insights, scale and never pause!