views:

37

answers:

1

What's the performance difference between a web server serving the same file to 10 people vs. 10 different files to 10 different people?

+3  A: 

Very little.

However if it was serving 1 file to 100,000 people vs. 100,000 files to 100,000 people then you might see a difference, as the single file can be cached in memory whereas the large number may not be able to be cached, so you'd see a lot of disk IO.

This assumes you're talking about static files (e.g. images). If you're talking about scripts then what the script actually does will be the main factor.

Greg
Yes, in this case I'm thinking about static files
meleyal
+1. And if any of those 100,000 people share a caching proxy, then the question is different again...
Steve Jessop
Specifically, we are loading a large random image on each page reuqest. Would there be any performance advantage if every visitor is seeing the same image at the same time?
meleyal
You will probably see a very small performance gain.
Greg
Probably not enough to be worth changing your code but it really depends on your exact circumstances
Greg