Cloudflare CDN - Getting started

Hi all.
I just got my account in hopes to set up Cloudflare CDN - is there an article or tutorial someone can link to me - I haven’t been able to find something on my own. If it helps to know - my domain is not being managed by Cloudflare.

Thanks

support.cloudflare.com has many articles about features and settings, including a Getting Started section.

Any chance I can get a link?
When I try and up getting a bunch of unrelated links
2021-09-15 10_13_17

It’s right here :point_down:

1 Like

I hate to do this, but none of the articles that I can see have anything to do with CDN.

Ah, I see. The CDN part is built right in. Cloudflare isn’t a traditional CDN. It just caches static resources (images, JS, CSS) as it passes through their proxy servers. There’s nothing else you need to do once you’ve added your site to Cloudflare to get that feature.

That’s great to know - I am concerned about changes I have to make at the domain level, the DNS level and the firewall level. Will that be in the “Add this site” instructions?

You’ll move your DNS (and all its records) here, and then Cloudflare will take it from there. Just make sure your site works right now with HTTPS before you add it to Cloudflare.

Alright - The website is actually hosted by us behind our firewall- will Cloudflare need any special ports in order to perform cache updates?

Also is Cloudflare compatible with the Pimcore service?

The rule of thumb is that if your site works via standard Port 443 HTTPS access, it will be fine on Cloudflare.

I hadn’t heard of Pimcore, but it looks like a web-based app, so it should be no different from anything else.

Thank you for all of your help sdayman - This should be the last question. We have a wildcard SSL certificate for our domain - will there be a section to uploaded, or does cloudflare use their own cert?

Keep your Wildcard cert on your server, and Cloudflare will issue its own SSL cert for its servers.

1 Like

Hey sdayman,

I got a bit more info from my b2b admin. Our webpage is actually hosted in the cloud - our son prem service is a PIM (Product Information Management) server. That is what we want to run through Cloudflare - that when someone access the website on our hosted service, and that hosted website asks for a specific image, it would fetch it from Cloudflare instead of our PIM server.

Also Pimcore provides basic API service to query and fetch product information - Is that something that caching can handle?

Is everything served from the same hostname? For example, if a customer is on pimsite.com, does it pull images from pimsite.com/images/product.jpg? If so, then Cloudflare cache will help.

(caveat) Cloudflare cache generally holds a file for about 4 hours at that location. If a visitor in Vegas visits your site, they’ll get uncached images. But the second visitor from Vegas visits your site within a few hours, they’ll probably get a cached image. A day later, that image will be dropped from cache if no other visitors have requested it. The new Tiered Caching helps a bit with this, so if a visitor in San Diego requests the same image, they might also get a cached file from the Vegas cache (simplified version of Tiered Caching).

I’m not entirely sure how Cloudflare cache works with API calls. I’m sure an @MVP could enlighten us.

1 Like

API calls are only cached if you instruct Cloudflare to do so via a ‘cache everything’ page rule, or if your API endpoints end in a certain file extension. If you don’t fit one of those, CF will just direct proxy the API calls to your origin.

4 Likes

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

To answer the final questions - I was able to ask the B2B admin for a better description of what we’re trying to upload.
I have a description of the current layout for the site - For the community form I anonymized it a bit.

Your question:
Is everything served from the same hostname? For example, if a customer is on pimsite.com , does it pull images from pimsite.com/images/product.jpg ? If so, then Cloudflare cache will help.

His Answer:
The server we’re talking about https://pim.site.com (in case the fact that it’s a subdomain is relevant or complicates matters, I’m not sure) and all the images will be served from there, like https://pim.site.com/product/abc/2021/abc.jpg - so I guess that’s a yes to sdayman’s question.

Might be worth noting that our goal is to launch a separate site (it will be at a different subdomain than pim.site.com, but still under the site.com domain) which displays the product images stored on pim.site.com. That’s the main reason why we want to put pim.site.com behind Cloudflare, to cache those images when possible and reduce the traffic going straight to pim.site.com

Your Question:
API calls are only cached if you instruct Cloudflare to do so via a ‘cache everything’ page rule, or if your API endpoints end in a certain file extension. If you don’t fit one of those, CF will just direct proxy the API calls to your origin.

His answer:
Not sure if the ‘cache everything’ page rule they’re talking about is something determined by our Apache configuration, or if they mean that’s something we can configure within Cloudflare? The API endpoints don’t end in a file extension.

I am sorry I missed the deadline for the last thread.

Cache Everything is a Cloudflare Page Rule.

1 Like

Sorry about pestering - So our setup will work, we will be able to cache our product pictures?