Will Flarum ever support CDN capabilities ? The ability to offload assets to the nearest node in terms of worldwide access is something that is mainstream now, and it's disappointing to not find this in Flarum.
phenomlab this is the existing issue https://github.com/flarum/core/issues/822
This is currently not part of any milestone. If you need this feature you can probably get it commissioned from a core or extension developer.
Also the question was also asked before:
@clarkwinkelmann I know it was asked before, but there hasn't been any movement. Would any dev be interested in picking this up for a fee ?
I think CDN should be core integrated.
Leanna I think CDN should be core integrated.
So do I in fact.
Leanna If you check the issue link that Clark posted, you'll see that the person who started the issue was Toby.
This is on Flarum's agenda, for sure, there are just other priorities ahead of it.
Just circling back here as it's been a while. I'm interested in paying for development to get CDN support - although I do firmly believe it should be in the core as it would benefit others tremendously.
Anyone ? Flarum really needs distributed CDN support. I'm happy to help fund this if any of the devs are interested.
We (Bokt.nl) are also interested in this and are willing to help fund this. Would be great if all static assets are loaded from a CDN/different domain.
My thoughts on this BartVB 😀
I haven't done any research yet on the second step, but it is possible to replace the RevisionCompiler, even though that requires replacing both the LessCompiler and the JsCompiler separately.
luceos I could be (very) wrong here, but wouldn't a simple extension that rewrites the URL be sufficient to enable CDN support ? This is effectively how WordPress does it.
phenomlab wouldn't a simple extension that rewrites the URL be sufficient to enable CDN support ? This is effectively how WordPress does it.
Yes for pull CDN's. But those have their issues as well with a scaled infrastructure. My proposal is for push CDN's, which gives full control to the app/op in terms of deployment of assets.
For anyone looking for a decent, fairly priced CDN provider, take a look at BunnyCDN - https://bunnycdn.com. I have no affiliation with them, but they are simply fantastic.
phenomlab Yes. I have been using. I liked it in every way.
luceos My requirement is for pull only, which I think would also suit most on here for static resources only. Even just pull support will massively improve the speed of flarum giving it the ability to be distributed from the static files perspective, and bring the website much closer to the users.
luceos Yes for pull CDN's. But those have their issues as well with a scaled infrastructure. My proposal is for push CDN's, which gives full control to the app/op in terms of deployment of assets.
I never heard of this. CloudFront, CloudFlare, Akamai and Fastly, that are the most common, only support pull mode
matteocontrini that's correct. There's little requirement for push CDN these days
This is how it's done with Laravel currently (from a coding perspective) using a pull zone
In a horizontally scaled environment you won't let all nodes recompile assets and publish their own version. The best solution then would to have the assets compiled during the CI/CD pipeline, in that situation you can also use a pull CDN. This would be my recommendation anyway.
luceos Thanks. I guess this is now an official extension request ! One that I am prepared to fund.