request_time for 206 typically bigger than that for 200
Maxim Dounin
mdounin at mdounin.ru
Sat Jul 30 12:34:06 UTC 2011
Hello!
On Fri, Jul 29, 2011 at 06:50:45PM -0700, Bo Shen wrote:
> My logs of nginx proxy server typically report bigger request_time for HTTP
> 206 responses than HTTP 200 responses. Any clue?
[...]
> Here is an excerpt from a parsing results from my logs, in the format of
> <$status> <$body_bytes_send> <$request_time> <byte/sec>. Last line is the
> average byte/second.
[...]
> t-a 33117629 4799.17 6900.7 <== much smaller than 200 case below
Typically range requests (and 206 responses accordingly) are used
to download big files over slow links or resume broken downloads.
There is no surprise speed for 206 would be less than for 200.
Additionally, in sample you provided 200 responses are generally
small. For small responses calculating speed as $body_bytes_sent
/ $request_time isn't really correct due to various factors
($request_time includes request reading time but not really
includes response sending time as nginx just writes data to socket
buffer and rest of the work is done by OS; $body_bytes_sent
doesn't include headers).
Maxim Dounin
More information about the nginx
mailing list