
Answer-first summary for fast verification
Answer: 1. Create a service account. 2. Grant the Cloud Run Invoker role to this service account for your Cloud Run application. 3. Set up a Cloud Pub/Sub subscription using this service account, with your Cloud Run application as the push endpoint.
Option A introduces unnecessary complexity by adding a Cloud Function as an intermediary, which is not required since Cloud Run can directly consume messages. Option B suggests a pull model, which is less efficient than a push model for this scenario. Option C is correct as it utilizes a push model with secure service account permissions, aligning with Google's recommended practices. Option D unnecessarily complicates the architecture by involving GKE and an additional container, which is not needed for direct message consumption from Cloud Pub/Sub. For more details, refer to Google Cloud's documentation on Pub/Sub subscriptions and Cloud Run tutorials.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your team is developing a social-media chat application that directly consumes messages from a Cloud Pub/Sub topic, to be deployed on Cloud Run. Which of the following Google-recommended practices should your team adhere to?
A
B
C
D
No comments yet.