تمكين CDN لمناقشك

hmm, can you resolve avatars from your host (or container)

Do you recommend MaxCDN? I am already their customer so it would be nice to keep things in a place.

Sure, we use them for some of our sites, reliable CDN

3 إعجابات

One question. if my discourse website uses SSL, then CDN must use SSL too right?

Yes, that is correct, most CDNs give you an ssl endpoint for free

7 إعجابات

@codinghorror - I see you recommend Fastly… that was a few years ago. This still the case now?

edit - also, they’ve overhauled their onboarding significantly to look like this:

view big image

Fastly is solid, you should shop around and see what prices and service you are interested in. The usual way all CDNs charge is per gigabyte per region (north america, europe, etc).

3 إعجابات

I’m trying to setup Fastly for my CDN.

Here is my setup:

Domain: discuss.endurancelab.fit
Address: IP Address of Host at Amazon
SNI Hostname: discuss.endurancelab.fit
TLS CA: I’m using Let’s Encrypt (installed at setup)

Fastly accepts all the settings and instructs me to add a CNAME. Adding CNAME records - Basic setup | Fastly Help Guides

At this point I’m a little confused. what DNS entry do I make? I can’t create a CNAME for discuss.endurancelab.fit to global.prod.fastly.net because of the MX and TXT entries on that domain.

The cdn would be at its own name like

discuss-cdn.endurancelab.fit

I thought traffic routes through fastly to the host? So don’t I need to point the domain name discuss.endurancelab.fit to global.prod.fastly.net which then routes traffic to the IP address of the host?

Also, from the Fastly website: “When using free TLS, you cannot DNS alias your own domain (www.example.org) to the shared domain (example.global.ssl.fastly.net). If you do, a TLS name mismatch warning will appear in the browser. The only way to avoid the mismatch error is to order a paid TLS option.”

Sorry, I’m sure this is a stupid question but I’ve literally spent about 4 hours reading the fastly docs and I’m stuck.

إعجابَين (2)

I don’t recommend routing all your traffic through there, ala Cloudflare. I am describing a traditional CDN, where only the static assets (css, js, etc) are delivered via CDN nodes close geographically to the user.

Does fastly no longer offer traditional CDN services?

إعجاب واحد (1)

Yes - they do deliver traditional CDN. I was hoping to test out dynamic content acceleration. But if you don’t recommend that, I won’t try it.

إعجابَين (2)

It is a way more complex setup for arguably negative benefit. We are a JavaScript app not a set of 1996 era old school HTML web pages :wink:

10 إعجابات

We have deployed Discourse on Google Compute Engine and looking to use Google Cloud CDN via Google Cloud Load balancer.
The load balancer automatically caches content (or any file) that has the cache-control header set. There are no separate origins needed.

  1. Is there a way we can set the cache-control headers for static assets?
  2. Do we have any example where someone would have achieved caching with Google Load Balancer?

I would appreciate any help here.

Update: 30 Dec 2017.
I found out that my discourse install is actually setting the ‘Cache-control’ header automatically for static assets like images and JS files. This certainly helps me use the Google CDN with no changes what-so-ever. Wow :slight_smile:

Earlier, i was not able to see it because we were running the ‘Bitnami Discourse image’. I think their image carries the development version of Discourse and hence, the headers are NOT set automatically.

I am happy that I moved to Official install!
Thanks guys.

Our Discourse installation:

8 إعجابات

I see Discourse recommends Fastly, but what about Cloudflare CDN? That is arguably the best CDN in the world.

Cloudflare isn’t a traditional CDN, more like a global man-in-the-middle service.

إعجاب واحد (1)

Well why wouldn’t you recommend Cloudflare for Discourse?

Do a search and see for yourself https://meta.discourse.org/search?q=cloudflare%20broken

إعجابَين (2)

Hi,

Sorry but i do not understand that;

How does discourse send new files ( images, updated js etc ) to my cdn provider - for aws cloudfront , how to s3 bucket which i used for cloudfront.

thanks

إعجاب واحد (1)

Your CDN requests them if it is asked for them and hasn’t yet cached them.

If you configure any CDN, that’s how they work. Bunny.net is easy to configure.

4 إعجابات