Search code examples
haproxyhttp-options-method

Why does HAProxy use HTTP OPTIONS for healtchecks, by default?


According to the HAProxy Configuration Reference, HAProxy uses an HTTP OPTIONS request for HTTP health checks, by default, with option httpchk.

Since I think it's implementation dependent whether web servers provide an HTTP OPTIONS handler or not, I wonder why HAProxy uses this request type by default. Is there any reasonable technical background?


Solution

  • They write the reasoning in the documentation you link:

    <method> ... When not set, the "OPTIONS" method is used, as it generally requires low server processing and is easy to filter out from the logs. ...