XF 2.1 AWS S3 DigitalOceans Spaces CDN

Zentro

Member
Hi,

We've recently transferred all attachments to DO Spaces. Everything worked out fine however the downloads are painfully slow. I tried setting the endpoint to the CDN endpoint (nyc3.digitaloceanspaces.com -> nyc3.cdn.digitaloceanspaces.com) but found it doesn't work with a 403 error on XF while a direct download via URL works perfectly fine.

This tutorial was followed during setup.
 
:rolleyes: If I'm not wrong, the attachments were fetched via PHP, CDN will not work for those file in /internal-data folder. You can use CDN for data folder which store avatars, thumbnail...
PHP:
$config['externalDataUrl'] = function($externalPath, $canonical)
{
    return 'https://xftest.ams3.digitaloceanspaces.com/data/' . $externalPath;
};
And even with CDN enable, it still much slower than attachments save on your server.
 
same. cdn url only works for the data folder. though i have not facing any speed problems because my forum is hosted on DO as well and overall performance is good. if you use a cloudflare like solution, you can use DO's custom domain feature for CDN and route the traffic through cloudflare's servers.
 
Back
Top Bottom