We're using CDN with Cache Reserve to serve large binary files. I'm confused by the
HIT
HIT
/
MISS
MISS
behavior.
Our setup - We host large files on Google Cloud Storage in private buckets - We serve it through Cloudflare using a CNAME record on a subdomain
cdn.ourdomain.com
cdn.ourdomain.com
- We enabled Cache Reserve to also cache large files - We use GCS signed URLs to allow access to these files - We have tried with "Tiered Cache" either enabled or disabled, it didn't change the observations below
What I observe downloading a 2GB file from
cdn.mydomain.com
cdn.mydomain.com
- It always returns
MISS
MISS
, no matter how many times i download it - However, after the first download, I see the "Egress savings (bandwidth)" and "Requests served by Cache Reserve" in the Cache Reserve page increase every time I hit the file, closely matching what I download - If I delete the file from GCS, I instantly get a 404 when trying to download the file again
Why I'm confused - Since the file seems to be served from Cache Reserved (according to the "Egress savings" metrics), I don't understand why I get
cf-cache-status: MISS
cf-cache-status: MISS
? - Why do I immediately get 404s right after deleting the file in GCS: does it mean Cache Reserve does a HEAD request every time the file is downloaded?
Trying the exact same setup with an 80MB file, I get
HIT
HIT
s after the initial requests, and if I delete the file from GCS I can still download it until the cache expires.