Hi,
We are testing a setup which has a local haproxy which connects to a remote
haproxy which in turn calls an apache server which returns a html page.
Haproxy(local)->Haproxy(remote)->Apache.
We have the set up working, the ping time from local to remote haproxy is 204
ms.
The time taken for the web page when accessed by the browser is 410 ms.
We want the latency to be 204 ms when accessed by the browser. We configured to
reuse http & with http-reuse aggresive|always|safe options
but could not reduce the 410 ms to 204 ms. It is always 410 ms. Please let us
know how we can reuse http & reduce out latency.
Thanks
Karthik
Please find the version, local config, remote config & local haproxy log
1.haproxy -vv
HA-Proxy version 1.7.9 2017/08/18
---------
2.Local config
-
global
log 127.0.0.1 local0
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
defaults
log global
mode http
option httplog
timeout http-keep-alive 50000
timeout connect 5000
timeout client 50000
timeout server 50000
maxconn 500
frontend http_front
bind *:80
stats uri /haproxy?stats
capture response header Connection len 32
default_backend http_back
backend http_back
option http-keep-alive
http-reuse always
server remote remote.haproxy.internal:80 check inter 60000 maxconn 500
-----
3. Remote config
-
global
log 127.0.0.1 local0
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
defaults
log global
mode http
option httplog
option http-keep-alive
timeout http-keep-alive 50000
timeout connect 5000
timeout client 50000
timeout server 50000
frontend http_front
bind *:80
stats uri /haproxy?stats
default_backend http_back
backend http_back
option http-keep-alive
http-reuse always
server web2 52.91.x.x:80 check inter 60000 maxconn 500
-----
4. Local haproxy log
172.31.x.x:53202 [26/Oct/2017:21:02:36.368] http_front http_back/web1
0/0/204/205/410 200 89 - - ---- 0/0/0/0/0 0/0 {} "GET / HTTP/1.0"