[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] [SPDY] partial transmission of data frames due to small transfer window size

Hello list,

I recently started using jetty-SPDY for pushing data from a server to a client. Yesterday however, I discovered that under heavy load (i.e. the server sending data in a loop without waiting), the flow control of SPDY kicks in and the window size goes from 64K bytes more and more towards 0 bytes, eventually reaching it.

My test server [1] sends small data frames with a data size of 56 bytes. Once the window size is smaller than this, it continues to send data thereby truncating data frames. The client then receives not the whole message anymore in one call of the onData() method.

I wanted to ask whether this behavior is the desired one and whether it is consistent with the SPDY specification [2] since it states in section 2.6.8 (WINDOW_UPDATE), "[...] The sender must not send a data frame with data length greater than the transfer window size. [...]"?

Shouldn't the server just pause until the window size is again big enough to allow sending the whole data frame?

Thanks for clarification.



[1] Code to replicate behavior: Server at http://pastebin.com/5CxREnn1
    and client at http://pastebin.com/CT082Dh0
[2] http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3