Answer the question
In order to leave comments, you need to log in
Is it possible to set up balancing in HAProxy depending on the CPU load?
Good afternoon, colleagues! Deployed HAProxy and several servers behind it. Everything works as it should, however, there are times when users pull expensive operations that must be processed immediately. In this case, the load of one server can reach 100%, while other servers are idle at 5-10%.
I would like to make it so that users move to another server at the time of peak load, until the operation is completed and the CPU load drops again.
Is it possible? And how to implement?
Answer the question
In order to leave comments, you need to log in
can be customized.
Look at the solution how percona xtradb cluster is balanced.
Namely:
- xinetd
- a script on top of xinetd on a specific port that returns http status 200 or another depending on something
- http haproxy check that refers to xinetd where the script is running that returns code
- haproxy balancing based on check
O script.
You can set it to return a NOT 200 status when cpuload goes over the top
Even more specifically
https://serverfault.com/questions/466059/haproxy-p...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question