Route ticket buyers at the CloudFront edge with a CloudFront function and a separate waiting room service
Short answer
C Separate the waiting room as its own ECS service with its own scaling and use a CloudFront function to route based on the JWT.
Question
Key Takeaways
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.
Common mistake: 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.
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
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-functions.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 5
-
Zas1 👍 11 Answered CCFFunctions:You can validate hashed authorization tokens, such as JSON web tokens (JWT), by inspecting authorization headers or other request metadata. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-functions.html
-
trungtd 👍 2 Answered COption A involves creating a separate service in the ECS cluster for the waiting room but relies on the ticketing service to forward requests to the waiting room service based on JWT information. This approach still puts some load and decision-making logic on the ticketing service, which can affect its performance during high load periods.
-
0b43291 👍 1 Answered CBy separating the waiting room service, using separate scaling configurations, and leveraging CloudFront functions for efficient routing, Option C provides a reliable and scalable solution while minimizing architectural changes and operational overhead. The other options have the following drawbacks: Option A: While it separates the waiting room service, it still relies on the ticketing service to handle the routing logic based on JWT information, which could become a bottleneck during high loads. Option B: Migrating to Amazon EKS and using StatefulSets may not be necessary for this use case and could introduce additional complexity and operational overhead. Option D: While using Amazon EKS and App Mesh provides advanced traffic management and security features, it may be an overkill for this specific requirement and could add unnecessary complexity to the architecture.
-
liuliangzhou 👍 1 Answered CA. No mention of finer control at the CloudFront level B. When it comes to migrating to EKS, it may bring additional complexity and cost. C. It combines the flexibility of ECS and the edge computing capability of CloudFront. D. It involves complex migration, configuration, and authentication mechanisms.
-
Win007 👍 1A is correct
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →