Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to understand how bandwidth works in relation to file requests, so that I can get a good feel of what, say, 100GB of monthly bandwidth would allow.

Let's say I have a php file with the compiled size of 2kb with no external file requests e.g images, surely that doesn't mean that file can be requested 50,000,000 times. What about database requests? What about the resources required by each individual php function?

If someone could explain how bandwidth usage is calculated (assuming it's not bandwidth/compiled file size = number of allowed requests), it would be VERY much appreciated!

share|improve this question

migrated from stackoverflow.com Sep 15 '11 at 7:21

This question came from our site for professional and enthusiast programmers.

I am afraid the question belongs to [serverfault]. – Salman A Sep 15 '11 at 5:51
EDIT: Yeah, I kind of figured it wasn't compiled size, but the size of reach of the requests in the file or something (compiled size only accounts for the amount of code), but then how would one measure the requests :(. – Pixelatron Sep 15 '11 at 5:53
just wait. a mod will move this question there in few minutes. – Salman A Sep 15 '11 at 5:54
Ok sweet :) thanks for your input by the way – Pixelatron Sep 15 '11 at 5:56
up vote 0 down vote accepted

Generally speaking, bandwidth refers to the data traffic to and from your server. The requests sent by a browser to your server plus the response sent by your server; all adds to the bandwidth usage. So if someone uploads a 2GB file to your server, that counts. The server's response such as you are not allowed to upload files, your upload was purged counts too. A very small PHP script can send GBs of data. Long story short, every single byte that comes and goes through your webserver is included in bandwidth. There are server side mods that count the bandwidth and limit or disable an account once this bandwidth is exceeded. You can find your bandwidth usage in the control panel (or invoice :)

As for database requests, I do not think they are included because the data transfer is local. Some hosting companies include FTP traffic into bandwidth usage though.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.