D
D
Dmitry Dubina2021-12-07 13:42:08
HAproxy
Dmitry Dubina, 2021-12-07 13:42:08

How to rebalance in HAproxy after raising the backend?

There is Haproxy + 3 backends (graylog) and around 20 services that write logs to graylog via TCP.

One graylog node cannot handle all 20 services (this is the reason why haproxy was installed).

Sometimes, in case of failure of one of the backends, haproxy spreads connections over the remaining backends, but in the case when the backend comes to life, it is not used (because the services keep the socket open for a long time).
It turns out the following picture, if the backends fail, all 20 services start writing to the most stable backend.

Actually, the question is, is it possible and if so, how to force Haproxy to rebalance (or at least break all connections) at the time the backend is restored? The main task of this is to evenly smear the load on the backends.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question