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

    • [deleted]

    matteocontrini that's correct. There's little requirement for push CDN these days

    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.

      • [deleted]

      luceos Thanks. I guess this is now an official extension request ! One that I am prepared to fund.

      • [deleted]

      Any Devs interested in picking this up as paid work ?

      8 months later
      a year later

      matteocontrini Cloudflare does that but it's unreliable at times and often increases TTFB. I had a pull CDN like Bunny.net in mind

      heyitsritesh Actually, yes! For this coming release, we've added in a filesystem abstraction, through which extensions can introduce custom filesystem drivers (S3 wrapped in a CDN for instance). The default flarum-assets and flarum-avatars systems also use this abstraction (defaulted to the local disk driver). There's currently no GUI, so it's up to extensions to implement an interface in admin, but it's now possible! A GUI might come in future releases.

      See flarum/core1783 for more information.

        a year later

        It's been over a year. Any methods to set a resource CDN for the javascript, fonts, CSS, etc etc.