SPDY increasing size of pages

Maxim Dounin mdounin at mdounin.ru
Wed Aug 8 13:31:33 UTC 2012


On Wed, Aug 08, 2012 at 12:50:48PM +0200, Piotr Sikora wrote:

> Hey,
> >This is how it is in nginx now. For example, if a response has
> >been sent over
> >HTTP with chunked transfer encoding, the $body_bytes_sent also
> >will not equal
> >to payload size.
> >
> >Personally I do not really agree with that, but it should be discussed and
> >changed globally.
> Yes, it should be changed to report only sent payload size (IMHO).

In case of http the $body_bytes_sent represents message-body[1] 
size (aka response body size) as sent to client.  Changing it to 
represent entity-body[2] size instead in general won't be trivial: 
e.g. with gzip transfer encoding it won't be possible to track 
size of payload sent without introducing either additional stream 
of "sizes" or some granularity.  With currently supported chunked 
encoding it would be a bit easier, but I don't really think we 
want this just to be able to see better(?) numbers in logs.  
Especially keeping in mind it's just some numbers, and I don't 
think entity-body size is really better than message-body size.

In case of spdy we might want to actually keep spdy as a separate 
layer and don't count it's overhead (or size reduction) at all, 
much like it's currently done for SSL.

[1] http://tools.ietf.org/html/rfc2616#section-6
[2] http://tools.ietf.org/html/rfc2616#section-4.3

Maxim Dounin

More information about the nginx-devel mailing list