Image Hosting: Amazon S3 vs. DigitalOcean Storage?

November 6, 2016 264 views
Storage Block Storage CentOS

I am currently hosting a service on Digital Ocean, as I move from development to release I have a few things I have to adjust.

I require that users be able to upload images and other media for storage. Ordinarily I'd use a service such as Amazon S3 or for smaller projects the free version of Cloudinary, however due to the fact that the number of images uploaded will be significantly large I think a separate solution is ideal.

Is Digital Ocean block storage sufficient for performing this task? I've found few resources on the topic and the official FAQ under When Should I Use Block Storage states: "As the document root or media uploads directory for a web server"

I understand that S3 is an object storage and not a block storage [It is also priced somewhat higher at ~$0.10/GB per month vs. ~$0.03/mo for S3] but I would like to keep things as simple as possible. The additional configuration to setup S3 alongside my meteor project seems daunting.

My question boils down to:

  • Is Digital Ocean Block Storage is suitable for this purpose?
  • Will everything play nicely with my existing CDN?
  • Can I create subdomain based image links? I.E.: images.mydomain.com/imagename.png (Amazon allows this through CNAME configurations)

Thanks for your time and sorry for the length, I tend to ramble.
Raymond.

1 Answer

how much space do you foresee using?

I think block-storage will be cheaper, as Amazon charges for uploading as well as storage space...so you could quickly run up a hefty bill with aws from the uploading and downloading even if you were not using much space.

Yes, you can create subdomains.

Not sure about CDN, but block-storage will just be a directory on your linux server. It is pretty straight-forward to work with.

  • The amount of space entirely depends on the number of users and the size\number of files they upload so that'd be hard to say. The title is a bit of a misnomer as videos can be uploaded as well, with videos typically being larger than images.

    I imagine all things considered I won't need too much at first, probably less than 100GB. Do you pay for space used or for the entire block at all times - even if it's empty?

    Do you have any data on how to setup the subdomains with digitalocean block stores?

    • DO Block Storage is just what is says: blocks of storage that you pay for by the chunk, while AWS is elastic and you pay for what you use...but with AWS you also pay for upload and download access so you have to think of that.

      Setting up Block Storage is a one-time thing, and it gives you exact instructions on how to do that when you create a new block. You end up with the block storage mounted in a folder of your choice, which you can then use for whatever purposes. Basically it is a few lines of code that takes a few minutes.

      You can always destroy the block right away, so it is no issue to give it a try and then destroy it if it does not suit your purposes. I believe you will only pay for the time you had it created.

      Basically: if you don't mind the extra costs AWS might be better because of its elasticity, but if you are being mindful of costs, Block Storage is probably going to save you some dollars each month.

Have another answer? Share your knowledge.