Site slows down if CDN is on



I have 2 different domains on cloudflare
using one with CDN on and one with CDN off
surprisingly when i fetch the same JPG image with CDN on its much slower

CDN off - - 50 ms
CDN On - - 300 ms

The same happens when using the same domain. Switching ON the CDN slows down the same URL

Any help will be appreciated


Why does CNAME not work with CDN ON

your CF-Cache-Status: is always miss, you will need to fix it and retest


Now this time i tried with an image file on S3, CF-Cache-Status: is HIT but still load time is higher

Origin file - 119 ms
cf file - 330 ms


Trying to use a free plan with S3 bucket
however the CNAME does not work if CDN is ON (DNS does not percolate)
works well only if Caching is OFF



What do you mean by it does not work?

My guess would be some TLS issue (e.g. you dont have a proper certificate configured) but that is only speculation without actual details. Whats the domain for starters?


> What do you mean by it does not work?
I mean DNS Checker does not show CNAME
I guess I got it wrong…
it does show 2 A records, and HTTP response shows CF-Cache-Status: HIT

However I am getting worse load time as compared to direct origin access


A proxied entry will never be a CNAME. Your setup seems to work.


> Your setup seems to work.
I guess so, however I am unable to get the desired result as the origin S3 load times are better than CF


for me its 32ms cloudflare vs 180ms-900ms s3


>for me its 32ms cloudflare vs 180ms-900ms s3
You got that from Free account?
Where was your origin and local location?
And filesize?


the free account shouldn’t be any slower than paid account with static cached files.
about filesize its the image you linked you can test it


How do we get to those magical timing?
Do we need to make the S3 static website?
So what is missing?


I don’t understand your question… those timing I got from your files:
cf file


You mean when you access the URL
the image is loaded in 32 ms? in a real browser?
Thats amazing?
Could it be because you are located close to a CF edge
and we are in India and closest edge location may be in Singapore?
(But I have seen other users of CF get < 50 ms loads from India)