I am curious.. Let's say I have 2 servers both are Linux. I then mount files from Server 2 via sshfs and are serving those files from a web app on Server 1. Is technically Server 1 grabbing the files from Server 2 and then serving them to the end web user, or is Server 2's network connection serving the files on behalf of Server 1?

1 Answer 1


The web app (or, perhaps, just the web server) will be opening the files, over ssh, and copying them out to the end recipient, more than trebling the total amount of work: each block of the file being read, encrypted, decrypted, and then (assuming TLS) re-encrypted again. (Of course, the file might be cached somewhere in that pipeline if it's frequently accessed.)

If you wanted to serve the files from the second host, running a web server on it and sending a 307 (or similar) HTTP redirection would have that effect, but in your scenario, there's no network stream between your end-user and the second host at all.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .