You run an IoT pipeline based on Apache Kafka that typically receives about 5000 messages per second. You want to use Google Cloud Platform to create an alert as soon as the 1-hour moving average falls below 4000 messages per second. What should you do?
A Consume the stream of data in Dataflow using Kafka IO. Set a sliding time window of 1 hour every 5 minutes. Compute the average when the window closes, and send an alert if the average is less than 4000 messages. B Consume the stream of data in Dataflow using Kafka IO. Set a fixed time window of 1 hour. Compute the average when the window closes, and send an alert if the average is less than 4000 messages. C Use Kafka Connect to link your Kafka message queue to Pub/Sub. Use a Dataflow template to write your messages from Pub/Sub to Bigtable. Use Cloud Scheduler to run a script every hour that counts the number of rows created in Bigtable in the last hour. If that number falls below 4000, send an alert. D Use Kafka Connect to link your Kafka message queue to Pub/Sub. Use a Dataflow template to write your messages from Pub/Sub to BigQuery. Use Cloud Scheduler to run a script every five minutes that counts the number of rows created in BigQuery in the last hour. If that number falls below 4000, send an alert. Show Answer Answer Explanation A 1-hour sliding (hopping) window evaluated every 5 minutes creates overlapping windows, each containing the most recent hour of messages, so it can calculate and alert on a current 1-hour moving average at five-minute intervals. Google Cloud documents that hopping windows overlap and are used for running averages; fixed windows are disjoint intervals.
Learn more
Community Discussion