0

I need to understand about something in NFS (Server). Let say i have:

  • Two Different Clouds (One Server on each)
  • One NFS Server
  • One Apache Server (as the NFS Client) with a NFS Mounted Directory (lets say at: /var/www/example.com/downloads/)
  • That will become something like: http://www.example.com/downloads/myvideo.mp4
  • Lets say: myvideo.mp4 is 1Gb in size.
  • 3 different users (3 downloads via Website = 3Gb via Web)

Ok then here is the question for, when a user downloads that file:

  • Of course i believe the Apache Server has to use Total 3Gb of Outbound Bandwidth.
  • Then again at the same time, has the NFS Server to use Total 3Gb of Outbound Bandwidth also?

Because, what i'm currently understanding is like:
NFS Server---(Outbound: ? Gb)--->Apache Server---(Outbound: 3 Gb)--->Browser

Hoping for the expert's advices since i have to understand clearly and then calculate b/w costs.

Thanks all in advance.

夏期劇場
  • 455
  • 2
  • 6
  • 19

1 Answers1

0

I'm assuming this is at a hosting provider? The simple answer is it depends on their policy, but generally you would only pay for the 1Gb once when it leaves Apache, not when it leaves the NFS server. Most hosting providers only charge for data when it passes through their router, so traffic between two machines at the same provider is free. If you want to be sure of this what you would do is setup a private network. So the Apache server would have two NICs: eth0 which is the Internet connected IP, and eth1 which is on a local network that just contains the Apache server and the NFS server. The NFS server wouldn't need any sort of Internet access at all (although I would setup the Apache box to act as a NAT router for the NFS box so that you can install package updates.)

  • Sorry they are on the DIFFERENT Clouds. (Sorry i edited the question) Can you please give the answer again? – 夏期劇場 Mar 26 '15 at 08:21
  • Ah, yes, in that case then you will have to pay for it twice, or maybe three times. The Apache server will request the file from the NFS server so that will be 1 Gb incoming to Apache and 1Gb outgoing for NFS. Then Apache will send it to the web client which will be 1G outgoing for Apache. So 1G incoming and 1G outgoing for Apache, 1G outgoing for NFS. – Charles Tassell Mar 26 '15 at 18:23
  • My real question is (since there are 3 concurrent Downloaders) ... will the NFS Client be pulling the file for 3 Times from Server? (Or cached somehow?) – 夏期劇場 Mar 27 '15 at 01:17
  • 1
    3 times. I think a better bet would be to use rsync or something similar to transfer the files from the NFS server to the Apache server once an hour or however often you need it done. Or just serve the data from the NFS server by installing Apache on it... – Charles Tassell Mar 27 '15 at 04:56