]> git.kaiwu.me - haproxy.git/commit
[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>
Tue, 24 Jul 2007 21:32:33 +0000 (23:32 +0200)
commit629db50da4c29d5f0c28482404cc8b42648aea4b
treecd834d053f18fe0b9be63ed53cd2bd05f443d7e8
parentb21152be7a4b227df7fe722073d501c3891f7733
[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