Site slows down if CDN is on

cdn
#1

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 - http://mb.avahan.co.in/img/logo1.png - 50 ms
CDN On - http://mb-st.sitcdn.com/img/logo1.png - 300 ms

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

Any help will be appreciated

Sunil

0 Likes

Why does CNAME not work with CDN ON
#2

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

0 Likes

#3

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

Origin file
https://s3.ap-south-1.amazonaws.com/tests3.sitcdn.com/25_mr.jpg - 119 ms
cf file
http://tests3.sitcdn.com/25_mr.jpg - 330 ms

0 Likes

#4

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

image

0 Likes

#5

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?

0 Likes

#6

> 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

0 Likes

#7

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

0 Likes

#8

> 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

0 Likes

#9

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

0 Likes

#10

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

0 Likes

#11

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

0 Likes

#12

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

0 Likes

#13

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

https://s3.ap-south-1.amazonaws.com/tests3.sitcdn.com/25_mr.jpg
cf file
http://tests3.sitcdn.com/25_mr.jpg

0 Likes

#14

You mean when you access the http://tests3.sitcdn.com/25_mr.jpg 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)

Sunil

0 Likes

closed #15

This topic was automatically closed after 30 days. New replies are no longer allowed.

0 Likes