QuestionQ23

Integrating applications with Google Cloud services

You must redesign audit-event ingestion from your authentication service so it can accommodate a substantial traffic increase. Currently, the audit service and authentication system run on the same Compute Engine virtual machine. You plan to use these Google Cloud tools in the new architecture:

  • Multiple Compute Engine machines, each running an authentication-service instance
  • Multiple Compute Engine machines, each running an audit-service instance
  • Pub/Sub to send events from the authentication services

How should the topics and subscriptions be configured to ensure the system handles a high message volume and scales efficiently?

  • A Create one Pub/Sub topic. Create one pull subscription to allow the audit services to share the messages.
  • B Create one Pub/Sub topic. Create one pull subscription per audit service instance to allow the services to share the messages.
  • C Create one Pub/Sub topic. Create one push subscription with the endpoint pointing to a load balancer in front of the audit services.
  • D Create one Pub/Sub topic per authentication service. Create one pull subscription per topic to be used by one audit service.
  • E Create one Pub/Sub topic per authentication service. Create one push subscription per topic, with the endpoint pointing to one audit service.
Explanation

A single Pub/Sub topic can accept events from all authentication-service instances. Multiple audit-service instances can pull from the same pull subscription, with Pub/Sub distributing a subset of messages to each instance; this provides load-balanced consumption without duplicating every event to every audit worker. Pull subscriptions are suited to high-volume, throughput-critical processing.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!