mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-28 13:24:28 -04:00
HAProxy - Load balancer
This bug happens when a service has multiple records on the same host and the server provides the A/AAAA resolution in the response as AR (Additional Records). In such condition, the first occurence of the host will be taken from the Additional section, while the second (and next ones) will be process by an independent resolution task (like we used to do before 2.2). This can lead to a situation where the "synchronisation" of the resolution may diverge, like described in github issue #971. Because of this behavior, HAProxy mixes various type of requests to resolve the full list of servers: SRV+AR for all "first" occurences and A/AAAA for all other occurences of an existing hostname. IE: with the following type of response: ;; ANSWER SECTION: _http._tcp.be2.tld. 3600 IN SRV 5 500 80 A2.tld. _http._tcp.be2.tld. 3600 IN SRV 5 500 86 A3.tld. _http._tcp.be2.tld. 3600 IN SRV 5 500 80 A1.tld. _http._tcp.be2.tld. 3600 IN SRV 5 500 85 A3.tld. ;; ADDITIONAL SECTION: A2.tld. 3600 IN A 192.168.0.2 A3.tld. 3600 IN A 192.168.0.3 A1.tld. 3600 IN A 192.168.0.1 A3.tld. 3600 IN A 192.168.0.3 the first A3 host is resolved using the Additional Section and the second one through a dedicated A request. When linking the SRV records to their respective Additional one, a condition was missing (chek if said SRV record is already attached to an Additional one), leading to stop processing SRV only when the target SRV field matches the Additional record name. Hence only the first occurence of a target was managed by an additional record. This patch adds a condition in this loop to ensure the record being parsed is not already linked to an Additional Record. If so, we can carry on the parsing to find a possible next one with the same target field value. backport status: 2.2 and above |
||
|---|---|---|
| .github | ||
| contrib | ||
| doc | ||
| examples | ||
| include | ||
| reg-tests | ||
| scripts | ||
| src | ||
| tests | ||
| .cirrus.yml | ||
| .gitattributes | ||
| .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)