Hi Robin. Am 26.10.2018 um 20:49 schrieb Robin H. Johnson: > Hi, > > This is something I have a vague recollection of existing somewhere, but > didn't find any leads in documentation or source. > > Right now, if you want to use load feedback for weights, you either need > something entirely out-of-band from the servers back to HAProxy, or you > have to use the agent-check option and run a separate health agent.
With that you mean "external-check command" ? https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#external-check%20command > The agent-check protocol is described only in the configuration.txt > 'agent-check' section, and is conveyed entirely over pure TCP, no HTTP. > It supports conveying useful health including weight and DRAIN/MAINT > states. > > The http-check behavior only supports matching strings or status codes, > and does not convey any load feedback. > > I would like to propose a new http-agent-check option, with two usage > modes. > 1. health-check mode: this connects like the existing agent-check, but > sends does HTTP request & response rather than pure TCP. > > 2. inline mode: if the server has best-case knowledge about it's status, > and HTTP headers are used for the feedback information, then it > should be possible to include the feedback in an HTTP response header > as part of normal queries. The header processing would detect & feed > the data into the health system during normal traffic. Interesting Ideas. Are there any LB's out there which already uses this concept? > Question: where & how should the feedback information be encoded in the > response? > 1. HTTP payload > 2. Single HTTP header > 3. Multiple HTTP headers I would like to have it in the one header per value 'Server-State-*' as the X- Prefix is Deprecated. https://tools.ietf.org/html/rfc6648 Deprecating the "X-" Prefix and Similar Constructs in Application Protocols for example: Server-State-Load Server-State-Users Server-State-Health Server-State-... Regards Aleks

