1 year ago

#227615

test-img

Noel Mathew

Cloudfront caching responses with Cache-Control : no-cache, no-store set from origin on traffic spikes(load testing with k6)

Current cache policy is set to

Minimum TTL : 0
Maximum TTL : 31536000
Default TTL : 0 

Origin Response We have a specific url pattern for which we are setting the Cache-Control: no-cache, no-store response header from origin.

Expected behaviour: The expected behaviour according to the docs Managing how long content stays in the cache is all the requests should reach origin server.

Test Condition We have been using k6 for load testing and found that under 10 rps for 10s, we get about 65% cache hit from cloudfront and only 35% cache misses based on the X-Cache header. We have tried many different combinations of TTL and other possible Cache-Control headers but nothing worked.

Expected Resolution We want all the requests with that specific pattern to reach our origin servers.

amazon-web-services

caching

amazon-cloudfront

cache-control

0 Answers

Your Answer

Accepted video resources