So my question is: Why does the Frankfurt Datacenter loose its Cache? Or maybe I am reading this wrong and it’s something else. My goal, of course, would be that I have continuous cache percentage of 95%.
Since the Site is near static and it has about 500k visitors a month, I’d expect the cache to not go stale.
There’s no cache purgin going on from my end or from site visitor’s end. Especially Images should not be purged - period. That’s what has me confused.
Just my 2 cents, but could be that the traffic was rerouted and therefore not served from FRA, but some other POPs close to FRA. Can you please check DUS, HAM and MUC, if they took over at this time, or even AMS and CDG?
It also could be the case that your Edge TTL was reached and therefore the cache was terminated. Even if the TTL was not reached the, TTL is not a guaranteed thing, more a flexible one, that can be terminated whenever needed.
That depends on if you have “Tiered Cache” activated or not.
But when I call it, I see this:
age for this cached image is 2.000.000 seconds old, which translates to about 23 days (75% of Edge TTL). Most other SVG files are also this age, which should not have resulted in any miss in the last 23 days for SVGs.
But when checking against some JPEGs I see a few of them:
The MISS that are relevant are just occuring on JPEG files. I can’t tell you why exactly this happened. But chances are it reached it’s TTL since a bunch of them now have the very same low age. And others are close to their Edge TTL (not Browser TTL).
I see this would make sense, thanks for the insight! My next question would be if it’s possible to somewhat randomize the TTL so the cache doesn’t go stale all at once (thousands of images), which then puts my origin under a lot of stress for a few hours?
TTL is not strict, so Cloudflare can purge your cache files whenevery it needs. So sometimes cache is getting terminated before it actually reaches it’s TTL.
The TTL is getting set, once a request is getting served by the webserver, when a resuest is triggers is getting initiated by the client, not by the owner, since the client/visitor requests the website/assets.
But what I would recommend is Tiered Cache, since once you have a MISS on one POP it falls back to another Tiered POP and therefore will result in a much higher Request/HIT ratio then without.
Tiered Caching is already on. That’s why I was confused by the high impact on the origin. I’d expect the cache refresh to not reach the origin (that often).
It’s almost as if Frankfurt lost its cache and instead every primary datacenter is now requesting from origin until Frankfurt is back up. If that makes sense.