@JavadocMD said in Hosting NodeBB behind a cache or CDN:
@PitaJ I saw that but it looked like it wouldn't fit my requirements. That is to say, it appears that NodeBB would still the first-responder to requests; it just alters paths to various static assets so that they will be accessed through the CDN.
Instead what I'm hoping for is for the CDN to be the first-responder for all requests, with a rule-set that causes it to pass-through requests that shouldn't be cached and interdict requests that can be cached.
For a forum, that's not very practical, in reality. There is so little that can be cached, and every request has to hit NodeBB. There's not much benefit to being "behind" a cache. We are behind CloudFlare, and they take a lot of our load, but they can't cache any pages because literally everything on NodeBB is dynamic. So other than caching things like JS libraries and CSS pages, it can't do much. And you still need a CDN to handle your media on the back end, presumably.
Having CF in front is nice, but it is the back end CDN that PitaJ is talking about that makes the real differences for you.