Report this

What is the reason for this report?

Can I setup blockstorage as a NFS for my web app?

Posted on November 30, 2016

I am planning to scale my drupal application. If i move my file system to a new node with block store which holds the files and mount it to my web app server. Does it impactmy performance?



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!

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.

You will see somewhat slower read/write speeds when accessing your block storage device over NFS from another droplet but in most cases it shouldn’t have any noticeable effect on serving content for a web application. If the droplet with block storage attached and the droplet you mount the NFS share on are in the same datacenter it will significantly improve performance over doing this over the open internet between two different regions…

Yes, you can. But why you would do something like that?

Performance depends on set up you go with. If we go back to your previous question How to replicate this architecture in DO for drupal?, we can see that there was talk about 2 web servers behind load balancer.

Possible set ups could be:

  1. Make one more node for files w/ block storage and host attach it on 2 other servers. I don’t see much benefit with this. You’ll be on the same, as you will still get that from one server. You use two web servers, yes, but data is still from one so if you have very high traffic, that can be potential problem.

  2. One web server with data on another. Nothing too much, you’ll just slow it down (unnoticeable, but still slower).

  3. Two web servers, data on third, attaching and reattaching NFS from server to server. Data will be available on only one in time so that’s not load balancing.

If you share you exact idea, we can discuss about performance, I got some ideas but there not so efficient in my opinion.

About speed, if you go with same data center, you can setup private networking for NFS. How to set up a new droplet for extended storage only? (Block space n/a yet.) was a questions from a few days ago, it use droplets space instead of block storage, but maybe it will give you idea of speed (read one of comments).

I was not working with Drupal, but as this is CMS, files should be always same. When you do changes, just set up some replication system and have files on both servers.

Maybe someone have another experience, but this is my opinions and I hope it will be helpful to you. =)

Hello,

Yes, you can configure it. Block storage is a generic term used to describe network-based storage volumes that are usually offered by hosting providers. Unlike Object Storage, block storage usually does not provide its own API for direct access. Instead, it needs to be mounted to an existing server and shared from that server. If you are using DigitalOcean’s Block Storage, running an NFS server on an attached droplet is a good solution to expose a block storage volume.

Moving your file system to a new node with block storage and mounting it to your web app server can have both positive and negative impacts on performance, depending on various factors. Here are some considerations:

Potential Benefits:

  1. Scalability:
  • Separating the file system to a dedicated node with block storage can allow you to scale your application horizontally. You can add more nodes to handle the increased load.
  1. Isolation:
  • Isolating your file storage from your web app server can prevent the web server from being overloaded with file-handling tasks. This separation can enhance overall system stability.
  1. Storage Performance:
  • If the block storage solution provides better I/O performance compared to the previous setup, it could lead to improved file read/write operations.

Potential Challenges:

  1. Latency:
  • Introducing a separate node for file storage might add some latency, especially if the communication between the web app server and the file storage node involves network transfers. This can impact the overall response time of your application.
  1. Network Overhead:
  • Transferring files between the web app server and the file storage node may introduce additional network overhead, particularly if there is a high volume of file operations.
  1. Complexity:
  • Managing a distributed system with separate nodes for different services can increase the complexity of your infrastructure. This may require additional effort in terms of configuration, monitoring, and maintenance.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.