mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-08 20:39:55 +00:00
BUG/MINOR: httpclient: keep-alive was accidentely disabled
The servers were not set with default settings, meaning that a few
settings including the pool_max_delay were not set, thus disabling
connection pools, which is the cause of the fact that keep-alive was
disabled as reported in issue #1831. There might possibly be other
issues pending since all these fields were left to zero.
Note that this patch alone will not fix keep-alive because the applet
does not enforce SE_FL_NOT_FIRST and relies on the default http-reuse
safe, thus if servers are not shared, all requests are considered
first ones and do not reuse existing connections.
In 2.7, commit ecb40b2c3
("MINOR: backend: always satisfy the first
req reuse rule with l7 retries") addressed this in a more elegant way
by fixing http-reuse to take into account the fact that properly
configured l7 retries provide exactly the capability that reuse safe
was trying to cover, and this patch is suitable for backporting.
This patch should be backported to 2.6 only.
This commit is contained in:
parent
6486ff8cab
commit
f80713ba8e
@ -1153,6 +1153,7 @@ static int httpclient_precheck()
|
||||
goto err;
|
||||
}
|
||||
|
||||
srv_settings_cpy(httpclient_srv_raw, &httpclient_proxy->defsrv, 0);
|
||||
httpclient_srv_raw->iweight = 0;
|
||||
httpclient_srv_raw->uweight = 0;
|
||||
httpclient_srv_raw->xprt = xprt_get(XPRT_RAW);
|
||||
@ -1172,6 +1173,7 @@ static int httpclient_precheck()
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
goto err;
|
||||
}
|
||||
srv_settings_cpy(httpclient_srv_ssl, &httpclient_proxy->defsrv, 0);
|
||||
httpclient_srv_ssl->iweight = 0;
|
||||
httpclient_srv_ssl->uweight = 0;
|
||||
httpclient_srv_ssl->xprt = xprt_get(XPRT_SSL);
|
||||
|
Loading…
Reference in New Issue
Block a user