We recently released a completely rewritten version of our Windows Feedback Agent for HAProxy. This blog sets out to explore the issues caused by the previous Feedback Agent, and more importantly why the new Feedback Agent is better.
Where can I get it? (Updated 05/11/2018)
As always the Feedback Agent is open-source under the GPLv2 license and can be found on our Github page here. It is compatible with both HAProxy & LVS therefore it also works with many commercial load balancers.
- Release 4.5.6 - Download
What is a Feedback Agent?
Normally when you are using a load balancer, you want the connections to be evenly distributed among real servers. This is usually based on the number of connections per server. However, an even distribution of connections won't always determine an evenly balanced workload within the cluster.
What happens when one user is running a large report that uses 100% of your server resources? You need the load balancer to be aware of the actual workload on each server - and take this into account when scheduling new connections.
The Feedback Agent is an easy to install service for Windows Server, with a simple graphical interface:
The Feedback Agent service combines a number of metrics such as CPU and RAM to calculate the availability of resources left on a real server. This is then reported back to the load balancer to determine where the next incoming connection should go.
The default configuration just returns the CPU idle rate. If you're interested in configuring more specific behaviors then please refer to the original blog post about the Feedback Agent.
Out with the old
The previous Feedback Agent was written in C# with the .NET framework. C# is an overall solid language, however, the problem lies with everything that comes with it - like Visual Studio, .NET and MONO. Perhaps this is a biased point of view, but we knew after attempting to update our project's version of .NET that it was time for a refresh.
The .NET copy used the Windows Management Instrumentation (WMI) to gather the system resources required in order to calculate a report on available resources. However, the original implementation ended up being really slow and cumbersome on newer systems, as the processes gathering data via WMI became temperamental for some customers.
In with the new
Golang is a fantastic language for a number of reasons. It is a compiled language so is inherently already quicker than its previous counterpart. Furthermore, support for cross-compiling allows us to re-use the same project to build for other platforms such as Linux in the future. Lastly, Golang sets out to be easy to both read and write, which will make maintaining the project simpler for us. For more information on Golang please visit https://golang.org/.
It was important for us to know that our customers could take what they already know about our previous Feedback Agent and apply that to our new iteration. This included keeping the XML-based configuration file and the .NET graphical interface. However, that meant .NET framework would still be a requirement with this new release.
For the record, our new Feedback continues to use WMI but without having to go through .NET to process the information. This, so far, has improved calculation speeds significantly.
It is also worth mentioning that our new Feedback Agent has a new minor feature that allows you to specify the listening port.
Our GO Feedback Agent is open-source under the GPLv2 license and can be found on Github here.
You can expect updates and improvements with time. Here are a few improvements that we may do next:
- Replace the GUI with a GO replacement, removing the need for .NET entirely
- Update our project so that it is also compatible with Linux
- Integrate further metrics such as drive I/O
If you would like to know more about the above or have any questions, just ping an email to firstname.lastname@example.org.