Learn the optimal design for processing seat reservations and providing instant confirmation to customers on a concert venue ticketing website. Discover how to leverage Google Cloud services like HTTP Load Balancing and Compute Engine managed instance groups.
Table of Contents
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?
A. Add the seat reservation to a Cloud Tasks queue, which triggers Workflows to process the seat reservation.
B. Publish the seat reservation to a Pub/Sub topic. Configure the backend service to use Eventarc to process the seat reservation on GKE.
C. Upload the seat reservation to a Cloud Storage bucket, which triggers an event to a Cloud Run service that processes the orders.
D. Submit the seat reservation in an HTTP POST request to an Application Load Balancer. Configure the Application Load Balancer to distribute the request to a Compute Engine managed instance group that processes the reservation.
Answer
D. Submit the seat reservation in an HTTP POST request to an Application Load Balancer. Configure the Application Load Balancer to distribute the request to a Compute Engine managed instance group that processes the reservation.
Explanation
When a customer selects a seat to reserve on the concert venue’s website, you want to process that reservation immediately and confirm it back to the customer without delay. Submitting the seat reservation details in an HTTP POST request to an Application Load Balancer is an effective way to achieve this.
The Application Load Balancer (part of Google Cloud’s HTTP(S) Load Balancing) can be configured to receive the incoming POST requests containing the seat reservations. It efficiently distributes those requests across a managed instance group (MIG) of Compute Engine instances that are responsible for processing the reservations.
The MIG can be set up to automatically scale the number of instances based on the volume of incoming requests, ensuring there is always sufficient capacity to handle spikes in traffic. This autoscaling capability is key to providing a responsive user experience even during times of peak demand.
When a reservation request reaches a Compute Engine instance in the MIG, the application running on that instance can process it, update the seat inventory database, and then immediately send a confirmation response back to the customer via the load balancer. This round-trip process completes quickly, giving the customer the instant assurance that their selected seat has been successfully reserved.
The other options, while feasible, are less suitable for this use case:
- Adding the reservation to a Cloud Tasks queue which triggers a Workflows process would introduce more latency and complexity compared to the direct load balancer approach.
- Publishing to Pub/Sub and using Eventarc and GKE would also add processing overhead and potential delays in the confirmation.
- Uploading to Cloud Storage and triggering a Cloud Run service would be an indirect way to process reservations compared to sending them directly to a compute backend.
In summary, submitting seat reservations via an Application Load Balancer to a dynamically scaling Compute Engine managed instance group provides the most direct, efficient, and scalable approach to process those reservations and instantly confirm them back to the customer. This design ensures a responsive ticketing experience on the concert venue’s website.
Google Professional Cloud Developer certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Google Professional Cloud Developer exam and earn Google Professional Cloud Developer certification.