Hi folks,
    I wrote a patch and add two new features for haproxy(1.3.15.7) yesterday
.

    1. HTTP-ECV(Extended Content Verification) monitor

       add "receive" keyword for HTTP-ECV monitor.
        ECV monitors use specified request uri and receive String settings
in an attempt to
        retrieve explicit content from backend nodes. The check is
successful when
        the content matches the Receive String value.
    Syntax: option httpchk GET /uri [receive  <receive string>] [HTTP/1.0]

-------------------------------------------------------------------------------------
    backend www
        balance source
        cookie SERVERID insert indirect
        option httpchk GET  /http-ecv.php receive "Hello World!" HTTP/1.0
        server www1 192.168.1.2:80 cookie A check port 80 inter 2000 rise 2
fall 2

-------------------------------------------------------------------------------------

    2. When check the reply of services, only 2xx is OK .

       If 2xx and 3xx are OK, assuming the following :

       Apache configuration:

-------------------------------------------------------------------------------------
       ErrorDocument 404 http://www.example.com/404.html

-------------------------------------------------------------------------------------

       Haproxy Config:

-------------------------------------------------------------------------------------
       option httpchk GET  /check.php HTTP/1.0

-------------------------------------------------------------------------------------

       So, if the file(check.php,) does not exists on the server(s), the
check will be redircted to
       http://www.example.com/404.html and get response code 302, it's still
will be OK, but actually it's not.

       Pls forgive my poor english and non-skilled C programming ability.

     Regards!
     FinalBSD

Attachment: haproxy-1.3.15.7.patch
Description: Binary data

Reply via email to