PROFESSIONAL-CLOUD-DEVELOPER · Question #391
You are a developer that works for a local concert venue. Customers use your company's website to purchase tickets for events. You need to provide customers with immediate confirmation when a…
The correct answer is B. Submit the seat reservation in an HTTP POST request to an Application Load Balancer. The correct answer is B because the requirement for 'immediate confirmation' demands a synchronous request/response pattern. An HTTP POST to an Application Load Balancer is a synchronous call - the backend processes the reservation and returns a response (success or failure)…
Question
You are a developer that works for a local concert venue. Customers use your company’s website to purchase tickets for events. You need to provide customers with immediate confirmation when a selected seat has been reserved. How should you design the ticket ordering process?
Options
- AUpload the seat reservation to a Cloud Storage bucket, which triggers an event to the backend
- BSubmit the seat reservation in an HTTP POST request to an Application Load Balancer.
- CAdd the seat reservation to a Cloud Tasks queue, which triggers Workflows to process the seat
- DPublish the seat reservation to a Pub/Sub topic. Configure the backend service to subscribe to
How the community answered
(24 responses)- A4% (1)
- B79% (19)
- C13% (3)
- D4% (1)
Explanation
The correct answer is B because the requirement for 'immediate confirmation' demands a synchronous request/response pattern. An HTTP POST to an Application Load Balancer is a synchronous call - the backend processes the reservation and returns a response (success or failure) within the same HTTP transaction, allowing the frontend to instantly confirm to the customer whether the seat was secured. Options A (Cloud Storage trigger), C (Cloud Tasks queue), and D (Pub/Sub topic) are all asynchronous patterns: the reservation is placed into a queue or bucket, processed later by a downstream service, and there is no direct return path to send an immediate response to the waiting user. Asynchronous messaging is valuable for decoupling and resilience, but it requires a separate notification mechanism (e.g., WebSocket, polling) to inform the user of the outcome - it cannot provide the immediate in-request confirmation the question requires.
Topics
Community Discussion
No community discussion yet for this question.