Weird difference between nginx and apache...

Dave Cheney dave at
Sun Nov 23 05:17:34 MSK 2008

Assuming this is a static file (not proxied from another server), then  
nginx will be sending less headers, assuming the default config.

Out of the box apache announces itself with a large "Server: Apache/ 
httpd mod_this, mod_that, mod_something else", it also send and Etag  
header by default, which nginx does not. If Keep-Alive is enabled,  
then apache sends a redundant "Keep-Alive: something" header where  
nginx stays mute.

What concerns me is the HTML transfered in both cases is not the same,  
it should be identical unless,
a. there is a bug in ab
b. your tests didn't return the same number of successful results.
c. nginx or apache chose to use chunked encoding to send such a small  



On 22/11/2008, at 9:13 AM, Robert Gabriel wrote:

> I have made some test related to the speed of apache and nginx on my  
> new
> server to see which would be the best for running. Of course the test
> have showed me that nginx is the best, there is no fight and no  
> question
> about it, but in my test I have found one thing weird.
> I have test botch apache and nginx with an image, a small 1-2k image,
> but the ab results I have this:
> Apache 2.0.63:
> Document Path:          /img.png
> Document Length:        1463 bytes
> Total transferred:      17538570 bytes
> HTML transferred:       14695835 bytes
> Nginx 0.6.32:
> Document Path:          /img.png
> Document Length:        1463 bytes
> Total transferred:      16841796 bytes
> HTML transferred:       14771911 bytes
> My simple question is why?! Is nginx losing something or apache adding
> something, if there is perfectly the same image.
> Im not so good at this kind of things, I just wanna know if there is
> some problems someplace.
> Thanks!
> -- 
> Posted via

More information about the nginx mailing list