SPDY: what is the purpose of blocked frame

Valentin V. Bartenev vbart at nginx.com
Fri Jul 5 14:59:17 UTC 2013


On Wednesday 26 June 2013 12:34:17 Yury Kirpichev wrote:
> Hello,
> 
> Thanks for analysis and explanation.
> Then how about the following workaround -
> - queue blocked frames at the begining of queue in FIFO order.
> (just remove from ngx_http_spdy_queue_blocked_frame the code:
>  if (frame->priority >= (*out)->priority) {
>             break;
>         }
> )
> 
> - queue non-blocked frames after blocked in priority order:
> static ngx_inline void
> ngx_http_spdy_queue_frame(ngx_http_spdy_connection_t *sc,
>     ngx_http_spdy_out_frame_t *frame)
> {
>     ngx_http_spdy_out_frame_t  **out;
> 
>     for (out = &sc->last_out; *out *&& !(*out)->blocked*; out =
> &(*out)->next)
>     {
>         if (frame->priority >= (*out)->priority) {
>             break;
>         }
>     }
> 
>     frame->next = *out;
>     *out = frame;
> }
> 
> Do you foresee any obvious drawback of such approach?
> 
[..]

At first glance I don't.  Indeed it can be a better strategy, particularly
since the SYN_STREAM frames are usually small.

Have you tested it already?

  wbr, Valentin V. Bartenev



More information about the nginx-devel mailing list