I noticed today that all requests hitting the APO cache and returning cf-cache-status: HIT are also hitting my origin server.
Fortunately, I have a page cache system in place on my server, so those requests are all returning cached pages that don’t take up much resources. But if a server doesn’t use a page cache system, it means all requests could eventually overload the server if they’re all hitting PHP instead of a cache.
The issue seems to only occur with cached HTML and NOT images or other static resources.
I was able to duplicate the issue on different browsers and platforms. To test, I simply refreshed different pages many times and noticed all requests created as many entries in my server’s access log. I believe requests filled by APO that return cf-cache-status: HIT should never hit the origin server, unless I’m misunderstanding something (maybe @yevgen can enlighten me on the matter).
I would be curious to know if anyone else can reproduce this APO behaviour.
Edit: I did a simple test and found something rather interesting. I disabled APO and made sure it was completely deactivated by checking that the cf-cache-status header returned DYNAMIC. Then, I activated a Cache Everything Page Rule for www.website.com/*. After refreshing a page a few times and getting cf-cache-status: HIT, I noticed the requests did NOT hit my origin server as there were no entries in the access log.
Edit: Interestingly enough, I disabled my local Page Cache and requests were not being logged in the origin server’s access log file anymore. So I guess this behaviour has to do with having APO on top of a server cache. I will close this ticket as it is probably not a real world issue.