Load Balance - HAProxy Configure Reverse Proxy With HTTP Authentication
最近在做另一个项目的performance测试,前端是用的HAProxy做负载均衡,以前都是用Nginx, HAProxy不是怎么熟,所以趁此机会把HAProxy梳理一遍。相对于后端,两台webserver, 分别有几块不同的performance测试:
纯http访问,不涉及UI表单的匿名访问;
另一种UI part涉及 Http Authentication表单的提交。
see the frist HA configuration:
1 | # HA version |
1 | global |
PS. HA version is too old, so used the diffence way to configure.
The detail HA forward configuration see here <–
重点说一下包含
HTTP Authentication
的HA配置,这一部分查了很多资料才解决http keeplive的问题。
并且这一部分的Authentication分Basic和Windows两种方式首先先看一下配置:
Above screenshots, it is depend on windows authentication, enable provides contains Negotiate and NTLM
see the windows authentication configuration:
1 | # add userlist for HA |
If used windows basic authentication, please modify these code block:
1 | listen perf-psm |
Special attention,
option httpclose
because this version is1.4.19
is didn’t supporthttp-keep-alive
, so when used windows authentication, must comment this.
And the detail answer please click here <–
BTW, the detail ACL used way please click here <–
Of course, the detail way and analysis check the forward charecters, please use the fiddler.
sample track
1 | BASIC: |
Author: itabas016
Link: https://tech.itabas.com/2016/08/25/web/haproxy-configure-reverse-proxy-with-http-authentication/
License: CC BY-NC-ND 4.0