exam questions

Exam Professional Cloud Architect All Questions

View all questions & answers for the Professional Cloud Architect exam

Exam Professional Cloud Architect topic 4 question 5 discussion

Actual exam question from Google's Professional Cloud Architect
Question #: 5
Topic #: 4
[All Professional Cloud Architect Questions]

For this question, refer to the EHR Healthcare case study. You are a developer on the EHR customer portal team. Your team recently migrated the customer portal application to Google Cloud. The load has increased on the application servers, and now the application is logging many timeout errors. You recently incorporated Pub/Sub into the application architecture, and the application is not logging any Pub/Sub publishing errors. You want to improve publishing latency.
What should you do?

  • A. Increase the Pub/Sub Total Timeout retry value.
  • B. Move from a Pub/Sub subscriber pull model to a push model.
  • C. Turn off Pub/Sub message batching.
  • D. Create a backup Pub/Sub message queue.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
raf2121
Highly Voted 3 years, 8 months ago
Answer : C (https://cloud.google.com/pubsub/docs/publisher?hl=en#batching) Cost of Batching is latency for individual messages,. To minimize latency batching should be turned off
upvoted 37 times
A21325412
1 year, 5 months ago
Updated link: https://cloud.google.com/pubsub/docs/publish-best-practices?hl=en#configure-batch
upvoted 4 times
...
...
gingerbeer
Highly Voted 3 years, 7 months ago
C - The cost of batching is latency for individual messages, which are queued in memory until their corresponding batch is filled and ready to be sent over the network. To minimize latency, batching should be turned off. https://cloud.google.com/pubsub/docs/publisher?hl=en#batching A incorrect. Application timeout because of publisher latency, nothing to do with timeout retry with publish request. D does not make sense at all. B is about receiver, not publisher.
upvoted 14 times
...
desertlotus1211
Most Recent 4 months, 4 weeks ago
Selected Answer: A
The issue at hand is increased load causing timeout errors during interactions with Pub/Sub. The lack of Pub/Sub publishing errors indicates that the problem is likely related to retries or network performance. By increasing the Total Timeout retry value, you allow the application more time to complete message publishing during high-load scenarios, reducing the chances of timeouts
upvoted 2 times
...
Gino17m
12 months ago
Selected Answer: C
"the application is not loggin any Pub/Sub publishing errors", so no need to increase Pub/Sub Total Timeout.
upvoted 2 times
...
a53fd2c
1 year ago
Latency in Pub/Sub can be of two types: End-to-end latency is the time it takes for a message to be published by a publisher and delivered to the corresponding subscribers for processing. Publish latency is the amount of time it takes to publish a message. When using batching, increasing both types of latencies is a trade off for improving efficiency and throughput.
upvoted 3 times
...
decw
1 year, 4 months ago
Selected Answer: C
C https://cloud.google.com/pubsub/docs/publish-best-practices#configure-batch
upvoted 2 times
...
Prakzz
1 year, 6 months ago
Selected Answer: A
See Solution #1 below link https://saturncloud.io/blog/how-to-fix-deadlineexceeded-when-publishing-to-a-cloud-pubsub-topic-from-compute-engine/#:~:text=The%20timeout%20limit%20for%20publishing,receive%20the%20DEADLINE_EXCEEDED%20error%20message.
upvoted 2 times
...
TopTalk
1 year, 7 months ago
Selected Answer: C
See video "Cloud Pub/Sub Publishers - ep. 4" at 2m 25 sec where Priyanka says "to reduce latency, batching should be turned off" https://www.youtube.com/watch?v=ML6P1ksHcqo&list=PLIivdWyY5sqKwVLe4BLJ-vlh9r9zCdOse&index=4. Batching increases throughput but adds latency for individual messages as they are queued in memory until their batch is filled.
upvoted 2 times
...
BiddlyBdoyng
1 year, 10 months ago
I voted C but I think it has to be A. "Total timeout: the amount of time after a client library stops retrying publish requests." "After each publish request, the request timeout increases by the request timeout multiplier, up to the maximum request timeout." So it's increasing the timeout value on the retry which seems like the best solution.
upvoted 2 times
...
JC0926
2 years ago
Selected Answer: B
B. Move from a Pub/Sub subscriber pull model to a push model. Explanation: Moving from a pull model to a push model in Google Cloud Pub/Sub can help improve the latency in your application. In a push model, the messages are pushed from the Pub/Sub service to the subscriber application, reducing the time it takes for the application to receive messages. This can help mitigate the timeout errors that you are experiencing due to increased load on the application servers.
upvoted 5 times
JC0926
2 years ago
Option A, increasing the Pub/Sub Total Timeout retry value, would not address the latency issue directly; it would only increase the time the publisher would wait for a response before considering it a failure. Option C, turning off Pub/Sub message batching, might actually increase latency and decrease throughput, as batching can improve the efficiency of message delivery. Option D, creating a backup Pub/Sub message queue, would not solve the latency issue directly; it might provide a failover mechanism but would not address the root cause of the problem.
upvoted 1 times
...
...
MaryMei
2 years, 1 month ago
Selected Answer: A
This is chatgpt's choice I agree that Pub/Sub message batching can be a useful optimization for improving overall throughput and reducing the number of API calls required to publish messages. However, in the context of addressing timeout errors during publishing, turning off message batching may not be the most appropriate solution. In cases where message batching is causing issues, such as network or system resource constraints, reducing the batch size or adjusting the batch duration can help improve publishing latency. However, in the case of timeout errors, increasing the Total Timeout retry value would be a more effective solution, as it allows more time for the message to be successfully published and reduces the likelihood of encountering timeout errors.
upvoted 3 times
afxwin
1 year, 4 months ago
Have you read ChatGPT's disclaimer?
upvoted 5 times
...
...
omermahgoub
2 years, 4 months ago
To improve publishing latency in this scenario, it is recommended to turn off Pub/Sub message batching. By turning off message batching, you can send messages individually as soon as they are published, rather than waiting for a batch of messages to be created before sending them. This can help to reduce the risk of timeout errors and improve the overall performance of the application. It is also a good idea to monitor the application's performance and error logs to identify any other potential issues that may be contributing to the timeout errors.
upvoted 5 times
...
surajkrishnamurthy
2 years, 4 months ago
Selected Answer: C
C is the correct answer
upvoted 1 times
...
Prashant2022
2 years, 4 months ago
but how is this related to turnoff batching??
upvoted 1 times
Prashant2022
2 years, 4 months ago
Let me ans: becuz we need to speed up the time to deliver the msgs to the app! and it waits and timesout..
upvoted 1 times
...
...
megumin
2 years, 5 months ago
Selected Answer: C
C is ok
upvoted 1 times
...
Tesla
2 years, 6 months ago
But no where in the question or scenario it says they turned on Pub/Sub batching.
upvoted 1 times
BlankSong
2 years, 3 months ago
Batch messaging is enabled by default in a client library. https://cloud.google.com/pubsub/docs/publisher?hl=en#batching
upvoted 3 times
...
...
Mahmoud_E
2 years, 6 months ago
Selected Answer: C
C is better option, even though increasing total timeout would help reduce timeout errors but remember that that in this case we are getting too many messages from the server since load increased and we need to reduce latency
upvoted 1 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago