mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-16 16:31:26 +01:00
BUG: compression: disable auto-close and enable MSG_MORE during transfer
We don't want the lower layer to forward a close while we're compressing, and we want the system to fuse outgoing TCP segments using MSG_MORE as much as possible to save round trips that can emerge from sending short packets with a PUSH flag. A test on a remote busy DSL line consisting in compressing a 100MB file on the fly full of zeroes only showed a transfer rate of a few kB/s due to these round trips.
This commit is contained in:
parent
70737d142f
commit
08b4d79d31
@ -5729,7 +5729,7 @@ int http_response_forward_body(struct session *s, struct channel *res, int an_bi
|
|||||||
* Similarly, with keep-alive on the client side, we don't want to forward a
|
* Similarly, with keep-alive on the client side, we don't want to forward a
|
||||||
* close.
|
* close.
|
||||||
*/
|
*/
|
||||||
if ((msg->flags & HTTP_MSGF_TE_CHNK) ||
|
if ((msg->flags & HTTP_MSGF_TE_CHNK) || s->comp_algo ||
|
||||||
(txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_KAL ||
|
(txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_KAL ||
|
||||||
(txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_SCL)
|
(txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_SCL)
|
||||||
channel_dont_close(res);
|
channel_dont_close(res);
|
||||||
@ -5742,7 +5742,7 @@ int http_response_forward_body(struct session *s, struct channel *res, int an_bi
|
|||||||
* flag with the last block of forwarded data, which would cause an
|
* flag with the last block of forwarded data, which would cause an
|
||||||
* additional delay to be observed by the receiver.
|
* additional delay to be observed by the receiver.
|
||||||
*/
|
*/
|
||||||
if (msg->flags & HTTP_MSGF_TE_CHNK)
|
if ((msg->flags & HTTP_MSGF_TE_CHNK) || s->comp_algo)
|
||||||
res->flags |= CF_EXPECT_MORE;
|
res->flags |= CF_EXPECT_MORE;
|
||||||
|
|
||||||
/* the session handler will take care of timeouts and errors */
|
/* the session handler will take care of timeouts and errors */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user