This happens in the case of a small body. We read the body into
req->input_brigade in ap_proxy_http_prefetch() before trying the first
node, but then loose it on the second node, because we use another req
and thus also another req->input_brigade then.
Not sure, how we could best save the read input_brigade for the second
attempt after failover. Will try some experiments.
If you try to reproduce yourself, make sure you use a small POST (here:
30 bytes) and also exclude /favicon.ico from forwarding when using a
browser. Otherwise some of the failovers will be triggered by
favicon.ico and you'll not notice the problem in the POST request:
ProxyPass /favicon.ico !
Regards,
Rainer
Am 29.10.2019 um 11:15 schrieb Rainer Jung:
A first heads-up: it seems this commit broke failover for POST requests.
Most (or all?) of the times a balancer failover happens for a POST
request, the request send to the failover node has a Content-Length of
"0" instead of the real content length.
I use a trivial setup like this:
<Proxy balancer://backends/>
ProxySet lbmethod=byrequests
BalancerMember http://localhost:5680
BalancerMember http://localhost:5681
</Proxy>
ProxyPass / balancer://backends/
where one backend node is up and the second node is down.
I will investigate further.
Regards,
Rainer