Route ticket buyers at the CloudFront edge with a CloudFront function and a separate waiting room service
A company needs to improve the reliability of its ticketing application. The application runs on an Amazon Elastic Container Service (Amazon ECS) cluster. The company uses Amazon CloudFront to serve the application. A single ECS service of the ECS cluster is the CloudFront distribution’s origin. The application allows only a specific number of active users to enter a ticket purchasing flow. These users are identified by an encrypted attribute in their JSON Web Token (JWT). All other users are redirected to a waiting room module until there is available capacity for purchasing. The application is experiencing high loads. The waiting room module is working as designed, but load on the waiting room is disrupting the applications availability. This disruption is negatively affecting the application's ticket sale transactions. Which solution will provide the MOST reliability for ticket sale transactions during periods of high load?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Routing the decision at the CloudFront edge means the overloaded waiting room service never receives the requests that should be admitted to purchasing, so protecting the sales path does not depend on the ticketing service staying healthy while it makes the admission decision.
An ECS-hosted ticketing application is served through CloudFront and limits how many users may enter the purchasing flow, identified by an encrypted attribute in their JWT, with everyone else redirected to a waiting room module. The waiting room works correctly but its load is now disrupting the availability of ticket sale transactions during high load.
Letting the ticketing service forward requests to the waiting room. The ticketing service then has to parse the JWT, make the admission decision, and proxy the request, so when the waiting room is saturated the ticketing service's own thread or connection pool is consumed by the redirection work, which is exactly the coupling that is causing the disruption.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The problem is that the overloaded waiting room is consuming the capacity of the ticketing path that must stay available for sales. Creating a separate service in the ECS cluster for the waiting room with its own scaling configuration isolates its resource consumption, so it can be scaled for its own traffic pattern without touching the ticketing service's capacity. The routing decision is then moved to the edge: a CloudFront function runs on the viewer request, inspects the JWT information carried in the request, and forwards the request directly to either the ticketing service or the waiting room service origin. Because CloudFront functions execute at the edge before traffic reaches the origin, the waiting room load never touches the ticketing service, which is what provides the most reliability for sale transactions under high load. This also requires no migration to Kubernetes.Why the Other Options Are Wrong
A: The architecture is correct in separating the services, but the ticketing service still has to inspect the JWT and proxy every waiting-room request, so under saturation the ticketing service's resources are consumed by redirection work, which is the coupling the requirement is trying to remove. B: Migrating to EKS and using a StatefulSet for the ticketing pod does not address the routing bottleneck, because the ticketing pod still forwards requests to the waiting room pod and remains coupled to its load, and it also adds a Kubernetes control plane to operate. D: Moving to EKS with App Mesh and mTLS adds inter-service authentication and a mesh controller without changing who makes the routing decision, so the ticketing pod still carries the redirection load, and mTLS authenticates service identity rather than authorizing an individual ticket buyer.Community Comment Notes
The community voted 100 to 0 for C, and the top-voted comment linked the CloudFront Functions documentation, which states that CloudFront functions can validate hashed authorization tokens such as JSON Web Tokens by inspecting authorization headers or other request metadata. Several other commenters independently explained why A is weaker, because it has no finer control at the CloudFront level and keeps the routing decision inside the overloaded path.Official Reference
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →