Cache misses and slow load from upstream

It seems like nothing gets cached - and the upstream loads like it’s via a 90s modem.
At least through CF. I am not sure what is going on. This used to load fine.

This is what it looks like on the upstream:

$ curl -I --resolve torstencurdt.com:443:127.0.0.1 https://torstencurdt.com/assets/img/torstencurdt.png
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 30 Jan 2024 19:14:34 GMT
Content-Type: image/png
Content-Length: 272372
Last-Modified: Thu, 25 Jan 2024 22:37:31 GMT
Connection: keep-alive
ETag: "65b2e2ab-427f4"
Expires: Tue, 06 Feb 2024 19:14:34 GMT
Cache-Control: max-age=604800
Cache-Control: public
Accept-Ranges: bytes

This is what it looks like with CF proxying

$ curl -I https://torstencurdt.com/assets/img/torstencurdt.png
HTTP/2 200 
date: Tue, 30 Jan 2024 19:14:41 GMT
content-type: image/png
content-length: 272372
last-modified: Thu, 25 Jan 2024 22:37:31 GMT
etag: "65b2e2ab-427f4"
expires: Tue, 06 Feb 2024 19:14:41 GMT
cache-control: max-age=604800
cache-control: public
cf-cache-status: MISS
accept-ranges: bytes
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=2adprIlHBH9h3P2ZixEIVAXs2HQNPYSzprUyXqS0BkAX3auBo%2FTYAgQ2covhkBEGCTI35i6NIVmQteCc61oA19r7IN%2FOdEhYwRwIkHlDuzn35h9F4hlwvkKbx2xbbIZOkSwT"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 84dc0a12ccf9c25e-VIE
alt-svc: h3=":443"; ma=86400

I have “Page Rules” set to “Cache Everything” and I also tried setting a “Caching” rule or “Dev Mode” to see if it makes a difference.

  1. Why is it a “cf-cache-status: MISS”?
  2. Why is loading from the upstream so incredibly slow?

Thanks for the help.

I got it moments ago first time accessing via curl:

curl -I https://torstencurdt.com/assets/img/torstencurdt.png

2nd and other via cURL it’s a HIT.

Moments ago, I can see it HIT in my Web browser (Firefox) first time when opened:

slika

By default, images and other extensions which are listed on the article below are cached by default (no need for Page rule Cache Everything → might mess up with HTML documents too):

May I ask if you’ve setup custom Cache Rules or Transform Rules followed by the Modify Response Header, or the Cache Configuration → Browser Cache TTL is set to “Respect Existing Headers”? :thinking:

Thanks for trying to help here.

It seems like things are slightly better now. I am now also seeing some

cf-cache-status: HIT

Not sure what it was.

That said. Forcing a reload in the browser is still incredibly slow.

Not as slow as when I posted this - but still. I am seeing 5s for a 270k image which is not caused by the upstream. A direct request to the upstream loads the image in (much) less than 1s.

Below is my current caching config (trying to also cache HTML until I purge the cache):

Any further input on why the upstream could potentially be that dog slow?

This is still a problem.
Anyone?

This sounds like a similar story.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.