I have inherited a system where it has some performance issues due to network latency. We are using CentOS 5.x, and haproxy 1.5x
The reason is that there is a lot of time spent on each API requests due to time spent on "initial connection"
Ignore the rest of the timing as this is just an example taken from web, the rest of the timing is fine from my end except for "initial connection" where all API calls are timed around 150 - 250ms for "initial connection".
After removing the settings "option httpclose" from haproxy, the performance has improved significantly as all the waiting time from "initial connection" are gone.
After going through some articles, I have found this one http://killtheradio.net/technology/haproxys-keep-alive-functionality-and-how-it-can-speed-up-your-site/
Where it suggest to remove:
option httpclose
and replace with
timeout client 5000
option http-server-close
So my questions are:
- When to use option httpclose?
- The server using haproxy is responsible for all our Restful API calls, are there any other considerations I need to be aware of after removing the config "option httpclose"?
- Should I use "option http-server-close" and what are the impacts?