← All quizzes

Night 26

CloudFront + API performance

CloudFront cache behaviors for /api/*, cache policies vs origin Cache-Control, X-Cache hit/miss, API Gateway stage vs usage-plan throttling, CloudFront vs ElastiCache vs API GW cache, invalidation vs TTL, globalskiatlas.com production patterns

0:00 / ~24m0/15 answered

15 timed scenario questions (~24 min, ~96 sec each). Reinforces night-26-cloudfront-api-caching.md and night-26-lab-cloudfront-setup scripts. Answer without peeking at night-26-quiz-answers.json first.

  1. 1.globalskiatlas.com serves static HTML from S3 and wiki JSON from API Gateway behind one CloudFront distribution. GET /api/wiki/pages should reach Lambda on every request until you design explicit edge caching. Which cache policy on the api/wiki* behavior is the safe starting point?

  2. 2.After enabling a permissive CloudFront cache policy on GET /api/iceberg-stats, the second identical request still shows X-Cache: Miss. Lambda returns JSON without Cache-Control or Expires. What is the most likely fix?

  3. 3.A partner mobile app must be limited to 1,000 requests per day with burst protection, using a key you issue per partner. Which API Gateway feature primary enforces per-client limits?

  4. 4.Night 23 placed Redis in front of Aurora for resort_stats rows inside the VPC. Night 26 discusses CloudFront in front of /api/*. How do the two caches differ?

  5. 5.Wiki POST /api/wiki/pages requires a Cognito JWT. GET /api/wiki/pages is anonymous. You consider edge-caching GET responses. Which cache-key design avoids serving one user's draft to another?

  6. 6.Traffic to your REST API stage exceeds the configured steady-state rate but stays within burst capacity for a few seconds. What HTTP status do clients typically receive when limits are exceeded?

  7. 7.Your CloudFront distribution has behaviors: default * → S3, api/wiki* → Wiki API, api/iceberg-stats → stats API. A request arrives for GET /api/iceberg-stats. Which behavior matches?

  8. 8.Frequently updated JSON at /api/iceberg-stats should not require paid invalidations on every deploy. What is the exam-favored approach?

  9. 9.An exam scenario asks where to view CacheHitRate for a CloudFront distribution serving globalskiatlas.com. Which namespace and Region combination is correct?

  10. 10.Which HTTP methods can CloudFront cache at the edge when listed in CachedMethods for an API behavior?

  11. 11.Account-wide API traffic spikes across many APIs in us-east-1. Some stages have not set custom throttle limits. What still caps total invoke rate?

  12. 12.You need to protect a regional ALB from HTTP floods. WAF is already on CloudFront for the public site. Where do you attach a REGIONAL-scoped Web ACL for the ALB?

  13. 13.Lambda behind API Gateway averages 800 ms; clients report slow TTFB on cache misses. CloudFront OriginLatency metric is high. First performance step before adding ElastiCache?

  14. 14.Exam contrast: API Gateway REST API stage cache vs CloudFront cache behavior for the same GET endpoint exposed via CloudFront → API GW → Lambda.

  15. 15.A viral article causes millions of identical GET /api/wiki/pages requests worldwide. DynamoDB read capacity is spiking. Which layered approach best cuts database reads?

Answer all 15 questions to submit.