mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-22 10:30:34 -04:00
HAProxy - Load balancer
One issue with the config parser is that while it tries to report as many errors as possible at once, it's actually unbounded. Thus, when calling haproxy on a wrong file, it can take ages to process, such as here on half a gigabyte of map file instead of config file: $ time ./haproxy -c -f large.map 2>&1 |wc -l 16777220 real 0m31.324s user 0m22.595s sys 0m28.909s This patch modifies readcfgfile() to stop reading the config file after a reasonable amount of fatal errors. This threshold is set to 50, which seems more than enough to spot a recurrent issue with a bit of context in a terminal to address several issues at once, without filling logs nor taking time to parse the file. The difference is clear now: $ time ./haproxy -c -f large.map 2>&1 |wc -l 55 real 0m0.005s user 0m0.004s sys 0m0.003s This may be backported to older versions without causing too many difficulties. However the patch will not apply as-is, it will require to increment the "fatal" count for each place where ERR_FATAL is set in the parsing loop. |
||
|---|---|---|
| .github | ||
| contrib | ||
| doc | ||
| examples | ||
| include | ||
| reg-tests | ||
| scripts | ||
| src | ||
| tests | ||
| .cirrus.yml | ||
| .gitignore | ||
| .travis.yml | ||
| BRANCHES | ||
| CHANGELOG | ||
| CONTRIBUTING | ||
| INSTALL | ||
| LICENSE | ||
| MAINTAINERS | ||
| Makefile | ||
| README | ||
| ROADMAP | ||
| SUBVERS | ||
| VERDATE | ||
| VERSION | ||
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)