Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Google Cloud Certified Professional Cloud Developer · Google Cloud
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Answer B. One topic, one pull subscription per audit service: Even distribution of messages No message duplication Scales horizontally Each instance gets unique messages
The best approach here is C. Create one Pub/Sub topic. Create one push subscription with the endpoint pointing to a load balancer in front of the audit services. Here's why: Scalability: A single Pub/Sub topic allows you to centralize all audit events. This makes it easy to scale the authentication services by adding more instances without needing to change the Pub/Sub configuration. Load Balancing: Using a push subscription with a load balancer in front of the audit services ensures that the incoming messages are distributed evenly across the available audit service instances. This prevents any single instance from becoming overloaded. Efficiency: Push subscriptions are more efficient than pull subscriptions for high-volume scenarios. This is because the Pub/Sub service actively pushes messages to the subscribers, reducing the need for the audit services to constantly poll for new messages.
Why other options are less ideal: A. Create one Pub/Sub topic. Create one pull subscription to allow the audit services to share the messages. This would create a bottleneck at the single pull subscription, as all audit services would need to compete for messages. B. Create one Pub/Sub topic. Create one pull subscription per audit service instance to allow the services to share the messages. This would be less efficient than push subscriptions and could lead to uneven message distribution. D. Create one Pub/Sub topic per authentication service. Create one pull subscription per topic to be used by one audit service. This would require a lot of topics and subscriptions, making the system more complex to manage. E. Create one Pub/Sub topic per authentication service. Create one push subscription per topic, with the endpoint pointing to one audit service. This would create a one-to-one relationship between authentication services and audit services, which is not scalable.