Question

Is Spaces suitable for images and video or not?

I’m very confused about the purpose of Spaces Object Storage. I’m planning to use it mainly for images (thumbnails etc, mostly <1Mb) and video (streaming directly to the user’s browser). I need the storage to be scalable since content will be generated by users.

It seems that object storage is a perfect match for that.

However, I came across the following passages in the Spaces docs:

Avoid Small Files … You should consider the size of your files and the way you upload them to Spaces if you are … Handling files smaller than 1 MB.

https://www.digitalocean.com/docs/spaces/resources/performance-tips/#file-size

You should use local or block storage if: … You have a high request rate for your data, like streaming video.

https://www.digitalocean.com/docs/spaces/resources/performance-tips/#use-local-or-block-storage-instead

So it’s not recommended for small images such as thumbnails? And it’s not recommended for streaming video? I need the flexibility of Object Storage but I’ll also be using it mainly for images and video…


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello there,

The Spaces products are specially intended for this purpose.

DigitalOcean Spaces is an object storage service that can be used to store large amounts of diverse, unstructured data. A lot of people use Spaces in order to host their static content and load them from there instead of hosting them directly on their droplets. Using object storage for these types of static resources can optimize site performance by freeing up space and resources on your servers

You can also enable CDN to speed up your end-user experience by caching assets at more than 25 global points of presence.

Hope that this helps! Regards, Alex

Hey!

While I don’t know enough about DO Spaces to answer your question directly, I would recommend using a CDN to serve the Spaces content. Requests would go to the Spaces API only once per border and would be cached there, the next ones would be served directly from the cache.

DO already gives us a CDN network: https://www.digitalocean.com/docs/spaces/resources/performance-tips/#cdn Or you could use another service like Cloudflare’s free CDN: https://www.cloudflare.com/cdn/

(I’m using Cloudflare’s CDN with Spaces and I get HUGE throughput with no impact on performance because most requests don’t even get to the Spaces API)