]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: backend: prefer-last-server breaks redispatch
authorWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2014 17:40:43 +0000 (18:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 24 Feb 2014 12:21:32 +0000 (13:21 +0100)
commit2481d167efd15708417a1ba68b2de35468a67358
tree2e37e6767d32ea70c6cdafe868efda7bed2db163
parent653dcd64da63349a80cfae2d7d040a4025f1c7e8
BUG/MEDIUM: backend: prefer-last-server breaks redispatch

Since 1.5-dev20, we have a working server-side keep-alive and an option
"prefer-last-server" to indicate that we explicitly want to reuse the
same server as the last one. Unfortunately this breaks the redispatch
feature because assign_server() insists on reusing the same server as
the first one attempted even if the connection failed to establish.

A simple solution consists in only considering the last connection if
it was connected. Otherwise there is no reason for being interested in
reusing the same server.
src/backend.c