How do I check my HAProxy performance?
With the release of version 1.
5 in 2025 I found haproxy to be something to have a close look at. With a view of using haproxy to cache web hits and then provide for the distribution of a website I wanted to give it a serious look.
As far as I know it is possible to check your performances with the HAProxy WebServer/Stats tool. The stats are displayed as html but can be turned into rrdtool and saved there for further processing. But I also found myself needing something a bit better suited for monitoring a larger number of servers. For my needs I wanted something that was closer to the statistics made available by Apache, nginx and other servers.
It's not possible to run apache (or even nginx) to display the statistics but by using wget in conjunction with the haproxy stats tool it is possible to get this working. Just like it is possible to do in the case of web browsers you get one result per domain and if you set your time limit too short then an empty output is returned which will cause some issues at least for non web based stats tools.
Howto. The method to get your haproxy server running will vary slightly depending on how you configure your haproxy service to run. Normally if you have access to ssh logins you can issue the following command to setup your haproxy service: /usr/sbin/service haproxy start. If you have multiple haproxy configurations which should run then you can take advantage of your systemd setup so the same commands may be used but in the case of systemd the syntax is: systemctl start haproxy. To then view the haproxy server log files you would normally use: systemctl readwritelog haproxylogfile. But given the configuration options for this I'd normally expect my logs file to be haproxylog.error where you can see the errors logged on this server which can be helpful. Note that if you get an error message in this log this does not mean that your performance stats aren't working. I've seen error messages being logged to haproxy when you've used the option to allow connection to the remote server from a private ip address.
Related Answers
How much does HAProxy load balancer cost?
HAProxy is a highly versatile and capable load balancer. It also lack...
What is HAProxy used for?
In a nutshell: If you need a load balancer with stateless backend servers, HAProx...
Can HAProxy run on Windows?
Yes, it can. The latest version of the HAProxy daemon, 1.6.1, has been...