Can I use Block or Object (Spaces) Storage for a load balanced infrastructure or do I have to use GlusterFS

I created a load balanced infrastructure but wanted to make sure it could scale by putting the entire app on GlusterFS. Now I’m wondering if I could have used Block/Object storage instead.

For a load balanced WordPress cluster, is it possible to have just mounted Block/Object Storage on a media server and then mounted the folder to WordPress folder for both WordPress nodes?

Or is it possible to mount Block/Object storage to the GlusterFS servers?

Show comments

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.

Whenever you are building a distributed system it is important to understand the different functions that are performed, which systems are involved, and what specific distributed/replication measures those systems support internally.

In your specific case you mentioned Wordpress so I’ll go with that as an example.

Whenever you are dealing with static files or media files, it is best to store them in Object Storage, such as Spaces, by default, this will is a system that is automatically distributed and fault tolerant, and you don’t need to monitor it for available diskspace and you can also enable a CDN immediately.

You can find information on how to integrate spaces here:

When it comes to storing media, block storage itself can only be mounted to a single droplet, so you would need to export it out via NFS if you want multiple systems to access it. But there isn’t a need to do this, as you are better off using Spaces instead.

Next you would have to distribute the database. DigitalOcean now has a Managed Database service which provides support for MySQL and Postgres and sets up replication for you. This way you can create a master database sever and add slave replicas as necessary. You can also enable backups to ensure that if anything goes wrong you can always roll back.

Now your assets and media are stored on Object Storage and your database is replicated.

Last you will need to replicate your web servers and you would use load balancing to split the load across them.

You can find a full tutorial series on that here:

You can also use DigitalOcean’s load balancers for this setup to reduce the need to setup HAproxy yourself.

Hopefully that gives you a head start as well as some basic explanation of the implementation and process.