New on LowEndTalk? Please Register and read our Community Rules.
Cloudflare vs Combination of CF+keycdn
Hi everyone !
I have seen some topics about combination of cloudflare with another cache like keycdn or whatever . I have not tried it because i do not get the benefits of combine a ngine x ( CF) + CDN(kkeycdn ) + NgineX ( the vps /ds server ) . I mean too many layers . Do you think that could be beneficial such combination . if we are focused on speeds . At least in my opinion would be slower because adding a middle layer ( even paid middle layer ) . thank you
Could end up not being faster than using a single provider. Ideally, after the first request everything will be cached and served from the edge (whichever the edge would be in this scenario). Now if the files are rotated out of the cache too often, the second layer could serve them to the edge instead of hitting your own servers, but you should figure out if that is what you are after. Cache MISS might be slower than with a single solution.
Problaby not needed Cloudflare has 153 + data centers with plans to grow to 250+ IIRC.
yes, cloudflare great for 90% of the world. Some places in Asia such as China have terrible peering to cloudflare though. I believe there are 2 ISP’s in australia that also refuse to peer with Cloudflare.
If Europe or North America is your target then Cloudflare will work great. If your target is Asia or Australia then maybe look elsewhere.
What type of content you want to cache?
If your VPS/DS Server has limited bandwidth or speed, you can put behind one cache before engaging another for world wide. That isn't the issue but mostly suitable for static file content.
Just for the sake of supporting different region or cost then take a look at multi-cdn implementation.
Definitely try to avoid connecting KeyCDN to CloudFlare. There will be an unnecessary extra layer + the CloudFlare security system that might trigger false positives if not whitelisted correctly. KeyCDN will always keep cache for longer, so CloudFlare will likely not really help with bandwidth.
Instead, if you want to use both to get the best performance, I would suggest connecting KeyCDN to your origin server directly and use CloudFlare on your domain itself and KeyCDN for the static assets.
You will likely see better performance with KeyCDN than CloudFlare (especially in Asia etc.) for two reasons. One will be the cache hit rate which I assume will be higher with KeyCDN. Each uncached request is likely as slow as if you weren't using a CDN at all. The second reason will likely be that despite having XXX datacenters, only a small number of these will be actually used on the free tier. The more you pay, the faster CloudFlare becomes, but it can get expensive rather quickly. In the end, it depends on what you're looking for in terms of performance vs price to decide if using KeyCDN is worth it compared to just using CloudFlare.
Best way to find out is to just give it a try, perhaps use https://www.webpagetest.org/ to run some tests around the world where the majority of your audience is.
A cache is different than a CDN. You can use cloudflare in front of your webhost, and KeyCDN Wordpress Cache plugin if you use wordpress to make your pages load faster. Maybe that's the combination you read about?
so basically keycdn would not be needed is not it ? I mean if the cache is saved in cloudflare keycdn would not improve the situation
thanks, yes cloudflare seems to be working nice , but you know need for speed . I have read about something in different places even in their cdn .....and technically i have not found any reliable way to be beneficial . thank you for your help !
it is static/dynamic web +shop . Right now i do not have any speed problem , but i wish to improve the speed ....yes i have chronic need for speed illness
Sure . What do you mean ? I mean the A record would be the cloudflare ip and how can i connect the keycdn directly to the origin ? Would you mind explain it a little bit, please ? thanks
sure ! I have not expressed myself correctly . I am using the super cache i have better performance . i have read for example this guide from their website : https://www.keycdn.com/support/cloudflare-cdn/
In that exemple you create a zone that goes directly to keycdn
If you don't "protect" this zone using cloudflare (grey cloud) it will go straight to keycdn. If you "protect" this zone behind cloudflare it will do cloudflare > keycdn but if you "push" your keycdn objects it can be faster than if cloudflare had to fetch the (static) assets on your origin webserver and it won't add an extra step as those assets will be fetched on keycdn POPs rather than on your server.
(Edit: it seems like they'll have to be pulled from KeyCDN storage server as you can't push to the edge servers, so I doubt it can be a lot more efficient than doing direct CF > YourServer...)
Anyway, adding cloudflare in front of KeyCDN might reduce your KeyCDN bill as cloudflare will help you save bandwidth payed to KeyCDN. If you consider that in some geographical areas KeyCDN is better than CloudFlare, you can keep a subdomain "greyed" so that your traffic goes directly to KeyCDN, as @BunnySpeed recommends. If you have no need to use KeyCDN and CloudFlare is enough for you, don't bother and just use CloudFlare as it's cheaper.
double comment , i can not delete it , sorry
I get it now but technically speaking for Europe and US the speed would be worst because the keycdn is not needed in order to achieve a nice speeds so for this scenario using a combination of them would not be really useful . I mean high probability of lower speed + paying extra money for low ¨ performance¨
You can set KeyCDN to connect directly to the IP (I think?) and then use the forward host option and configure your server to respond to the CDN hostname: https://www.keycdn.com/support/pull-zone-settings/#forward-host-header