Data frame size sent by server

Muhui Jiang jiangmuhui at gmail.com
Mon Oct 19 17:30:47 UTC 2015


As I am researching on the flow control strategy of HTTP/2 recently. The
internal buffers will show me something about it.

Thanks Valentin.

Best Regards
Muhui Jiang

2015-10-20 0:55 GMT+08:00 Valentin V. Bartenev <vbart at nginx.com>:

> On Sunday 18 October 2015 16:02:04 Muhui Jiang wrote:
> > Hi
> >
> > I made a request to nginx 1.9.5 for a large file. Here is a part of debug
> > file:
> >
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8192
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8174
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL to write: 16384
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL_write: 16384
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 18
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8192
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8156
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL to write: 16384
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL_write: 16384
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 36
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8182
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL to write: 8227
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL_write: 8227
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame
> > 00007F942205F7A0 was sent
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:
> > 00007F942205F7A0 sid:1 bl:0 len:8192
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame
> > 00007F942205F8A8 was sent
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:
> > 00007F942205F8A8 sid:1 bl:0 len:8192
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame
> > 00007F942205F9B0 was sent
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:
> > 00007F942205F9B0 sid:1 bl:0 len:8192
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame
> > 00007F942205FAB8 was sent
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:
> > 00007F942205FAB8 sid:1 bl:0 len:8192
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame
> > 00007F942205FBC0 was sent
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:
> > 00007F942205FBC0 sid:1 bl:0 len:8182
> >
> > It seems that the default max frame size is 8192. But I don't under stand
> > the buffer mechanism. I marked them in red color. why there is a very
> small
> > buffer 9, and why some value is 8174, 8156.
>
> You shouldn't care about these numbers as long as they are related to nginx
> internal buffers.
>
> 9 is a buffer used for HTTP/2 header of the DATA frame (the header is
> always
> 9 bytes long).
>
> 8174 is the rest in the SSL buffer (see the ssl_buffer_size directive)
> after
> coping two DATA headers and 8k of one DATA frame.
>
> So the rest 18 bytes of DATA frame will be sent in the next TLS record.
>
>
> >
> > BTW: what is the 116 means in the beginning of every row as below:
> > 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:
> > 00007F942205FBC0 sid:1 bl:0 len:8182
>
> It is a connection identificator for the worker process.
>
>   wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20151020/5923f6ca/attachment.html>


More information about the nginx mailing list