Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 94 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 94
Topic #: 1
[All Professional Cloud Developer Questions]

You need to redesign the ingestion of audit events from your authentication service to allow it to handle a large increase in traffic. Currently, the audit service and the authentication system run in the same Compute Engine virtual machine. You plan to use the following Google Cloud tools in the new architecture:
✑ Multiple Compute Engine machines, each running an instance of the authentication service
✑ Multiple Compute Engine machines, each running an instance of the audit service
✑ Pub/Sub to send the events from the authentication services.
How should you set up the topics and subscriptions to ensure that the system can handle a large volume of messages and can scale 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.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
gfr892
Highly Voted 2 years, 10 months ago
https://cloud.google.com/pubsub/docs/subscriber "Multiple subscribers can make pull calls to the same "shared" subscription. Each subscriber will receive a subset of the messages." Response is A. With C and D you can't scale efficiently, because you have to create a topic for each new instance of the authentication service.
upvoted 12 times
akshaychavan7
2 years, 3 months ago
This seems to be a smart answer and follows the logic with which I was thinking.
upvoted 1 times
...
...
telp
Highly Voted 1 year, 10 months ago
Selected Answer: A
A is correct. This is the most flexible way to scale, allowing the authentication and audit services to be sized independently according to load. B is incorrect. This will cause messages to be duplicated, one copy per subscription. C is incorrect. This will allow the system to scale, but push subscriptions are less suited to handle large volumes of messages. D is incorrect. This will allow the system to scale, however each audit service will listen to all subscriptions. E. is incorrect. This will allow the system to scale, however it will require each audit service to listen to all subscriptions. Also push subscriptions are less suited to handle large volumes of messages.
upvoted 5 times
...
thewalker
Most Recent 4 months, 1 week ago
Selected Answer: C
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.
upvoted 1 times
thewalker
4 months, 1 week ago
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.
upvoted 1 times
...
...
Aeglas
1 year ago
Selected Answer: A
Most simple and efficient one is A
upvoted 1 times
...
braska
1 year ago
Selected Answer: E
Option E is a more scalable and efficient solution for handling a large volume of messages and scaling efficiently.
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: A
I would go with A.
upvoted 1 times
...
Yochen
1 year, 2 months ago
In my opinion, Option C would be the most efficient way to handle the scenario. Here's why: Single Topic: Having one Pub/Sub topic keeps things simpler and allows all authentication service instances to publish to the same topic. Push Subscription with Load Balancer: This allows incoming messages to be distributed among all available audit service instances. The load balancer would handle distributing the load, making it easier for the audit service to scale out as needed. Option C ensures both scalability and efficient handling of a large volume of messages.
upvoted 1 times
...
closer89
1 year, 6 months ago
Selected Answer: A
i go for A + custom pubsub metric on autoscale
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
Answer is E, in which there is one topic per authentication service and one push subscription per topic, with the endpoint pointing to one audit service, is a better option because it allows the audit services to scale horizontally to handle a large volume of messages, and it allows the messages to be processed in parallel. Each authentication service will send messages directly to its own topic, which will be handled by a specific audit service. This will ensure that the system can scale horizontally to handle a large volume of messages, and it will also allow the audit services to process the messages in parallel.
upvoted 1 times
omermahgoub
1 year, 10 months ago
A, in which there is only one topic and one pull subscription, would not allow the audit services to scale horizontally to handle a large volume of messages, as they would all be pulling messages from the same subscription. If the volume of messages increased, the audit services would not be able to process them all in a timely manner, as they would be competing for messages from the same subscription. B, in which there is only one topic and one pull subscription per audit service, would also not allow the audit services to scale horizontally, as they would all be pulling messages from the same topic
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
C, in which there is only one topic and one push subscription with a load balancer endpoint, would not allow the audit services to scale horizontally to handle a large volume of messages. The messages would all be sent to the same endpoint, which would be handled by the load balancer. If the volume of messages increased, the load balancer would not be able to distribute the messages to the audit services in a timely manner, as it would have to process all of the messages itself before forwarding them to the audit services. This could lead to bottlenecks if the volume of messages increased.
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
D, in which there is one topic per authentication service and one pull subscription per topic, you may encounter issues with scaling efficiently as the number of authentication service instances increases. This is because you would have to create a new topic for each new instance of the authentication service, and each audit service would have to pull messages from a different topic. This would not allow the audit services to process the messages in parallel, as each audit service would be pulling messages from a different topic and processing them sequentially. This could lead to bottlenecks if the volume of messages increased.
upvoted 1 times
...
...
zellck
1 year, 11 months ago
Selected Answer: A
A is the answer.
upvoted 1 times
...
tomato123
2 years, 3 months ago
Selected Answer: A
A is correct I think
upvoted 2 times
...
Blueocean
2 years, 10 months ago
While this can be between C and D , I would go with Option D considering the large volume mentioned in question
upvoted 1 times
...
scaenruy
2 years, 10 months ago
I vote C
upvoted 2 times
...
ParagSanyashiv
2 years, 10 months ago
Agree with D
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...