Best Options for Shared Scalable Storage in DigitalOcean

I am looking into ways to create horizontally scaled PHP applications and I currently use DigitalOcean which doesn't have the concept of shared storage disks. Seeing as I would like to stick with DigitalOcean what are some good options that individuals have used?

I have been mostly looking at GlusterFS but my main concerns are latency and contention issues. Thoughts?

TJ's photo

I host most of my PHP applications on Digital Ocean but push all user storage to needs to S3 so I've never really had to worry about storage.

I agree with @kayy that AWS EFS would be something good to look into.

I've also been looking at Vultr because they have block storage that you can use to expand with.

Adam Listek's photo

TJ, thanks for the note about Vultr. That actually looks perfect for what I need and on-par with DigitalOcean. Reviews of the service seem very positive. When I looked at their control panel, I almost thought it was a rebranded service on top of DigitalOcean, they look very close to each other. The only thing I don't think they have that DigitalOcean does is the Floating IP's option, which is nice, but not a dealbreaker. After further looking at the FAQ, currently you cannot mount the block storage to more than one server or across regions (though that's not unexpected).

Christopher's photo

DigitalOcean is not the best option for scaled PHP Applications or better Scalable Storage. How would you add more Storage, from an external Server? DigitalOcean is pretty inflexible in those parts.

If you are looking for scalable storage you should take a look at AWS EFS.

Or if you are looking for some options here is a good article.

Adam Listek's photo

I appreciate the answer and I do realize that DigitalOcean is inflexible in that regard but I am sticking with that for now. With that, I am looking for what options are available within that context. Thanks!

Christopher's photo

Awesome News for you :) DigitalOcean just announces the new Block Storage :)

Frank Lämmer's photo

I can totally understand that a shared network storage is the first option to think of, but maybe an offsite object storage is a better solution?

Think of an 12-factor App with ephemeral storage where you separate code from content + abstract the file system.

How to implement: take your WordPress (Drupal …) and plug in an AWS S3 add-on. This transfers all files to a cloud storage ans serves them from there.

Disclaimer: I am fortrabbit co-founder. We are specialized in scalable PHP hosting and we used to have an attached network storage for our Old Apps are now replacing with an Object Storage instead.

Show +1 replies
Frank Lämmer's photo

@alistek I do not have much first hand experience with WordPress. From our point of view WP does not play very well with the modern development patterns we like so much – Composer, Git … Our advice to use WP on fortrabbit together with Bedrock, which is a bit of hack.

Keeping everything together on one host is a good idea! When you dare to go into DevOps a bit further you might consider to put everything on AWS, leveraging multiple services. This post illustrates and explains a basic setup using: ELB, EC2, S3, RDS. It's basically how the managed fortrabbit infrastructure looks as well.

Bottom line: Sorry no practical advice here. But maybe be careful about shared network solutions to share data across multiple hosts and go the other way around and offshore files in the first place. Have a look at flysystem and WP Offload S3 Lite .

BTW: AWS is building a shared network solution (EFS) for their services as well, but it already takes much longer than first anticipated — it's complicated.

Adam Listek's photo

@franklaemmer that's some good ideas. I do have experience building some of those solutions on AWS, mostly this is for a bunch of non-profits that I host and I wanted a bit more resilient a network stack while keeping the costs down. I'll take a look at everything and compare costs, but I appreciate the thoughts and links!

Jan Vladimir Mostert's photo

Why not just use something like Cassandra if i may ask? Whatever you're trying to build with GlusterFS is probably already available if you use a NoSQL solution like Cassandra which also scales well on commodity hardware like Digital Ocean's

Show +2 replies
Adam Listek's photo

@sixlive, I have used S3 for Wordpress content years ago but it quickly cost too much (at the time) for the bandwidth. Since I am designing with scalability in mind, it would be the entire Wordpress installation (so if a plugin updates it would across all servers). Thank you for the link though, I'm checking it out!

TJ's photo

@alistek I see what you're trying to do, then maybe something like Vultr would be the better fit.

Muhammad Azaz Qadir's photo

I won't recommend a shared hosting for PHP based website. They are just not secure and fast. You can easily host a PHP website on DigitalOcean server in one-click using Cloudways platform. No need to manually setup or configure stack. The server will already have that configured. You can get started with deploying your website right away. If you want to attach a block storage to your server, you can do from their platform in one-click and scale up anytime you need.

Adam Listek's photo

Thanks for the answer, that's actually what I was already doing (and still currently do). I use DO and provision the servers via Ansible, I also use block storage, firewalls, Spaces and CloudFlare for DNS.

The problem is that block storage cannot be shared storage across systems. Therefore I would need block storage for both systems and then something such as Ceph of GlusterFS to sync the data.

That's primarily what advice I was after since I don't have a ton of experience using those types of storage systems.