
Answer-first summary for fast verification
Answer: Use Cloud Tasks to queue the trade requests and Cloud Functions to process them.
## Explanation For this high-volume trade processing scenario, **Cloud Tasks + Cloud Functions** is the most appropriate solution because: ### Why Cloud Tasks? - **Task-based queuing**: Cloud Tasks is specifically designed for executing discrete tasks/jobs with guaranteed delivery - **Rate limiting and retries**: Built-in support for controlling execution rates and automatic retries for failed tasks - **Secure**: Integrates well with IAM for secure access control - **Reliable delivery**: Ensures trade requests are processed exactly once ### Why Cloud Functions? - **Python API integration**: Cloud Functions natively supports Python, which matches the company's Python API requirement - **Event-driven**: Automatically triggers when tasks are added to the queue - **Scalable**: Automatically scales based on queue depth - **Cost-effective**: Only runs when there are tasks to process ### Why not the other options? - **Cloud Pub/Sub**: Better for streaming/messaging scenarios, not task execution with guaranteed processing - **Cloud Scheduler**: Designed for cron-like scheduled jobs, not real-time queuing - **Workflows**: Better for orchestrating complex workflows, not simple task execution - **Cloud Run**: Could work but Cloud Functions is more lightweight for this specific Python API use case This combination provides a secure, scalable, and efficient solution for processing high-volume trade requests with the company's Python API.
Author: LeetQuiz .
Ultimate access to all questions.
NO.35 An online brokerage company requires a high volume trade processing architecture. You need to create a secure queuing system that triggers jobs. The jobs will run in Google Cloud and call the company's Python API to execute trades. You need to efficiently implement a solution. What should you do?
A
Use Cloud Tasks to queue the trade requests and Cloud Functions to process them.
B
Use Cloud Pub/Sub to queue the trade requests and Cloud Run to process them.
C
Use Cloud Scheduler to queue the trade requests and Cloud Functions to process them.
D
Use Workflows to queue the trade requests and Cloud Run to process them.
E
Use Cloud Tasks to queue the trade requests and Cloud Run to process them.
F
Use Cloud Pub/Sub to queue the trade requests and Cloud Functions to process them.
No comments yet.