I have an haproxy server which balances the load between three production servers using (for reasons I don't understand) the source algorithm. One of them keeps getting into a state where although it is not working properly, haproxy doesn't spot this. Consequently my website goes down for some people.

I have a test haproxy server which balances the load on some test servers. I would like to test some other haproxy.cfg to see whether the faulty server can be detected. However, the fault is intermittent and I cannot reproduce it - I have to wait until it happens naturally.

I am thinking that I could test the test haproxy server by letting it balance loads on the faulty production server. But this would have to happen at the same time as the production haproxy server, so that the fault can occur. I could then see whether the test haproxy server (with a different haproxy.cfg) has spotted it.

But, as a complete beginner, I don't know whether letting two haproxy servers balance the load on the same (production) server is possible/sensible/a very stupid idea indeed.

  • Ah, I have thought of a way round this: When it next occurs, I could remove the faulty server from the production haproxy haproxy.cfg and add it to the test haproxy haproxy.cfg and then, because the faulty server will stay in its faulty state until I sort it out, play till my heart is content. But it would be nice to know the answer to my question anyway... – Matthew Taylor Jul 14 '17 at 15:37

There is no problem having two haproxy instances pointing to the same set of servers. No need to wait until it fails to reconfigure your test one.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.