CDN for Spaces worth it?

July 30, 2019 211 views
DigitalOcean

I have a video sharing site whereby we use DO Spaces as our bucket for content. We have finally setup our bucket and got our site working with DO by serving videos from our Space. The question is, would enabling CDN actually make things significantly better for our users who all from all over the world? If so, to enable CDN, we must provide our own subdomain and SSL cert?

2 Answers

Hello!

Using a CDN when you have clients/visitors from all over the world is not a bad idea. Most of the CDN providers also offer free SSL as well. Using a subdomain is options (basically this is totally up to you, using the main/primer domain is not an issue)

If you’re updating your website’s content every day you may experiencing some issues because the CND will cache the content and your visitors/clients may see the cached version of your site and not the live version of the site itself. However it’s something you can try and if it suits your needs you can keep it.

Alex

2 questions so let’s break this down,

CDN is worth it, if your userbase is geographically spread over multiple continents all over the globe. It’s good for the end user, not just the videos but the all the static content (images, client side javascript, css).
The only thing that it may hurt is your wallet.

As Alex said, if you need to update daily you may not want to do these updated files over CDN as there is edge caching, although there are work arounds (expiry headers, filename change ?version=12239, client side workers, etc).

A custom subdomain is possible, and an SSL certificate is not needed, as you can use Let’s Encrypt but you won’t be able to use a wildcard ssl.
You can provide your own SSL, eg for wildcards or extended validation.

There is tons of information around that topic here: https://www.digitalocean.com/docs/spaces/how-to/customize-cdn-endpoint/

Have another answer? Share your knowledge.