Hi Aleks, Thanks for the reply, I have replied inline.
Thanks Karthik -----Original Message----- From: Aleksandar Lazic [mailto:[email protected]] Sent: Thursday, October 26, 2017 5:54 PM To: Rajamani, Karthikeyan (TR Technology & Ops); [email protected] Subject: Re: HAProxy1.7.9-http-reuse Hi ------ Originalnachricht ------ Von: [email protected] An: [email protected] Gesendet: 27.10.2017 00:13:50 Betreff: HAProxy1.7.9-http-reuse >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. ping is normally icmp and will be answered by the kernel. http is normally tcp and will be answered by the apache httpd. How do you measure the latency on the browser site? We use chrome's tools->nw & also apache bench -- Why do you expect that a complete other work flow have the same amount of time? You can try to use mod_cache or some other cache concepts to reduce the disc I/O, in case you deliver a file and it fits into os cache. The RTT via ping is 204 ms, with the use of http-resue always/aggressive the time via the apache bench/ browser should be close to the RTT + a small time overhead for headers/io. But the http-reuse has no effect on the request to response time. As per the documentation the http connection should be reused & the total time should be close to the ping time Ab -n 1000 -c 40 ip. The I/O time is very minimal Regards Aleks >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" > > > > > > > > > Thanks again! Best Regards Karthik

