Report this

What is the reason for this report?

NFS Mount versus Private Networking

Posted on August 5, 2014

I was wondering if any of you seasoned admins could compare these 2 approaches in terms of speed, bandwidth usage, security etc. I have an idea but don’t really know enough to take action so maybe you could point out advantages and disadvantages of each option in general. Also, more specifically, if I want to serve a few domains with very low traffic from apache in droplet A, while storing the files on droplet B, what 'd you recommend? Thanks in advance.



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.

The two are unrelated.

Can you describe what problem you’re trying to solve?

(AKA, why can’t you do this on one droplet, what do you hope to achieve with a second one, etc)

The situation is something like that: two small-scale droplets, A and B. A runs apache and a few low traffic domains. B runs only mysql and a few other maintenance services.

Both have very low average CPU usage. As for the disk space, droplet A is starting to run low while droplet B still has a lot of free space. So I could make a NFS mount to access disk B on droplet A and use it to serve one or two low traffic domains. I guess this could be achieved through private networking too. Is this a really bad idea? Thanks again.

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

If you have a few domains with very low traffic, then either approach would be fine. However, if you are concerned about bandwidth usage or security, then I would recommend using option 2.

Here is a table summarizing the advantages and disadvantages of each option:

Factor Option 1 Option 2
Simplicity Simple More complex
Speed Fast (if droplet A has sufficient resources) Slower
Bandwidth usage High Low
Security Low High

If you want to serve a few domains with very low traffic from Apache in droplet A, while storing the files in droplet B, I would recommend using option 2. You can use NFS or SSHFS to mount the files from droplet B to droplet A.

Here are the steps on how to do this:

  1. Install the NFS or SSHFS client on droplet A.
  2. Create an NFS or SSHFS share on droplet B.
  3. Mount the NFS or SSHFS share on droplet A.
  4. Configure Apache to serve the files from the mounted share.

I hope 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.