1

What is going on on my web server if I mount a SSHFS drive at a remote server (off site, hosted by a VPS on a different domain) and someone downloads a file that I have on my web server?


Here's the scenario, if the question above needs elaboration:

  1. File downloads are getting too large and too frequent to be supported by my company's web server and ISP.

  2. We have had a VPS in place for about a year to handle video downloads and it has more than enough bandwidth and storage to be our file server

  3. Our current web server and ISP are sufficient to handle general web traffic and it would be a pretty major project to migrate the entire site

I want to know why, how (and if) placing files on the remote machine will tax my machine's load and my network's bandwidth.

Peter Turner
  • 2,178
  • 9
  • 33
  • 45

1 Answers1

5

If you indeed use SSHFS to serve the content, this is an amazingly bad idea. Here is what happens:

  • The file is downloaded from the remote storage to your local server.
  • And then transmitted to the client.

In effect, you will double the traffic four your system. This happens because the web server doesn't know that the file is on a remote server, he just sees a file in his file system.

Why don't you just replace the links to files local to your server to files on the other server?

Sven
  • 98,649
  • 14
  • 180
  • 226
  • Well, that's good to know. Replacing the links is what I have been doing, unfortunately, my super secret security protocol (pumping files in a private directory through an iFrame) doesn't accommodate having links on private directories on remote servers. – Peter Turner Apr 17 '12 at 14:58