
Answer-first summary for fast verification
Answer: Write votes to a Pub/Sub topic and load into both Bigtable and BigQuery via a Dataflow pipeline. Query Bigtable for real-time results and BigQuery for later analysis. Shut down the Bigtable instance when voting concludes.
The correct answer is D. Writing votes to a Pub/Sub topic and loading them into both Bigtable and BigQuery via a Dataflow pipeline is the most efficient and cost-effective solution. This approach decouples the voting process from the processing, allowing for scalability and handling of the large volume of data. Bigtable is used for real-time results, and BigQuery for later analysis, with the Bigtable instance shut down post-voting to optimize costs. - **Option A** is partially correct but lacks the efficiency of using Bigtable for real-time results. - **Option B** is incorrect because Memorystore is not designed for handling large volumes of data like those generated in live voting scenarios. - **Option C** is not the best choice as Cloud SQL may not be as cost-effective or efficient for high throughput and processing requirements of live voting.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
In the scenario of a live TV show where viewers vote via mobile phones, generating a significant amount of data in just 3 minutes, you are responsible for the 'Voting infrastructure'. Your tasks include ensuring the system can handle the data influx, processing all votes, displaying interim results during the voting period, and accurately tallying the votes once voting concludes. What steps should you take to meet these requirements efficiently and cost-effectively?
A
Write votes to a Pub/Sub topic and have Cloud Functions subscribe to it and write votes to BigQuery.
B
Create a Memorystore instance with a high availability (HA) configuration.
C
Create a Cloud SQL for PostgreSQL database with high availability (HA) configuration and multiple read replicas.
D
Write votes to a Pub/Sub topic and load into both Bigtable and BigQuery via a Dataflow pipeline. Query Bigtable for real-time results and BigQuery for later analysis. Shut down the Bigtable instance when voting concludes.
No comments yet.