[MEDIUM] improve behaviour with large number of servers per proxy
authorWilly Tarreau <w@1wt.eu>
Tue, 24 Jul 2007 21:32:33 +0000 (23:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 9 Sep 2007 19:09:28 +0000 (21:09 +0200)
commit5af3a694f5278793685a102fa8e33974bc608443
treeb3205df66a82a1b7d11b3221fa976589f17470ca
parent632f5a7b6f2a9dbe3e4cd8630ebfdadc4551e2df
[MEDIUM] improve behaviour with large number of servers per proxy

When a very large number of servers is configured (thousands),
shutting down many of them at once could lead to large number
of calls to recalc_server_map() which already takes some time.
This would result in an O(N^3) computation time, leading to
noticeable pauses on slow embedded CPUs on test platforms.

Instead, mark the map as dirty and recalc it only when needed.
include/proto/backend.h
include/types/proxy.h
src/backend.c
src/cfgparse.c
src/checks.c
src/proto_http.c